Commit Graph
48 Commits
Author SHA1 Message Date
schroda cdf9229457 Feature/global update show last update time (#468)
* Show last global update timestamp

* Add update button to "Updates" screen
2023-11-19 22:43:29 +01:00
schroda d12ac27b61 Feature/download ahead while reading (#464)
* Download next chapters when marking chapter as read while reading

* Add "auto delete chapter" settings

* Delete chapter after finished reading

* Delete chapters after marking them as read

* Improve "mark previous as read" action

Send only ids of chapters that are actually unread
2023-11-19 21:17:35 +01:00
schroda 7db5435967 Remove "useCache" query from image requests (#465)
Should have been removed with eda682d9ab
2023-11-19 21:17:10 +01:00
schroda 482db4626a Prevent infinite re-renders in extensions (#457)
Regression introduced with 593acc7f89
2023-11-18 19:55:35 +01:00
schroda a0a52b11a1 Fix/pagination of sources which require pages to be fetched in order (#451)
* Handle sources that do not support revalidation

At least e-hentai is not able to handle out of order pagination requests.
E.g. in case the last request was for page 1 and the next one is for page 3, the result will be for page 2, because e-hentai just ignores the request page number and just returns the next page after the last fetched one.

* Optionally clear source browse cache when opening component

At least e-hentai is not able to handle out of order pagination requests.
The revalidation logic will cause exactly this.
Due to this, the revalidation for these sources is disabled.
To prevent an out of date cache, it gets cleared when routing to the source component
2023-11-11 23:43:22 +01:00
schroda 345fbcb5c7 Fix/apollo client spamming infinite requets on failure (#450)
* Remove abort controller by default from requests

Apollo client is, for whatever reason, considering it a new hook call when passing an abort controller to be passed to the actual request.
On request failures this then causes infinite requests due to it being a new hook call.

* Move side effect into useEffect

This was missed and started causing issues after the changes of 60429d9d98544e1e49a112aacf77bdbb831740ec.
Due to the changes, the component did not re-render unnecessarily which caused the component not to re-render with the fetched data

* Reset fetching initial pages state

The state was never reset, thus, in case of an error, the initial pages fetch was never triggered again
2023-11-11 23:42:58 +01:00
schroda 291e1899f9 Remove re-fetching of manga query on chapter update (#449)
The mutation returns the mutated manga, thus, updating the cache which makes this  refetch unnecessary and just creates redundant requests.
2023-11-11 23:42:33 +01:00
schroda c5f943d571 Get latest manga data from the apollo cache (#447)
When using the cached results, replace them with the latest cached data from apollo.
This will have the updated data, that was inserted from the manga update mutation
2023-11-05 22:40:35 +01:00
schroda 593acc7f89 Refresh extension list after updating (#446)
When using the cached results, replace them with the latest cached data from apollo.
This will have the updated data, that was inserted from the extension update mutation
2023-11-05 22:37:28 +01:00
schroda 7cb062d453 Feature/extensions always use fetch mutation to get list (#440)
* Reset the cache after importing a backup

* Add option to delete cached data after ttl is reached

* Always use mutation to get extensions list
2023-11-04 22:40:38 +01:00
schroda 1acda66b16 Feature/update backup restore to server changes (#438)
* [Codegen] Update back query/mutation

* Update backup restore

* [VersionMapping] Require server version "r1410" for preview
2023-11-02 13:01:01 +01:00
schroda a638333684 Handle source browse when first page is also the last page (#436)
In case the first page was also the last page, there is no next page that can be fetched.
On large screens, where the initial pages to fetch are 2, this resulted in an endless loading screen
2023-10-29 20:51:53 +01:00
schroda 4c6d507405 Feature/show backup restore progress (#431)
* Extract "Progress" component

* Show backup restore progress
2023-10-29 01:49:27 +02:00
schroda 30fd8b0fca Feature/support new tachiyomi backup file extension (#430)
* [Codegen] Fix restore backup mutation/query

The server doesn't support nested objects for file uploads

* Support new tachiyomi backup extension
2023-10-29 01:45:08 +02:00
schroda 5a5b12a9e1 [ESLint] Prefer named exports (#427) 2023-10-28 00:32:02 +02:00
schroda 68e7b4b16d Feature/library global update exclude manga with state (#281)
* Extract global update settings

* Add option to exclude mangas with specific state from global update
2023-10-27 23:39:05 +02:00
schroda 2ad9ccd9bd Use gql for loading default category mangas 2023-10-27 20:23:47 +02:00
schroda b6382bb33a Load only category mangas that are in the library 2023-10-27 20:23:47 +02:00
schroda e2fed69c90 Optimistically refresh categories on reordering 2023-10-27 20:23:46 +02:00
schroda b7e1afd4f4 Update refetching queries and evicting cache data 2023-10-27 20:23:46 +02:00
schroda 5263a1102c Rename "doRequestNew" to "doRequest" 2023-10-27 20:23:46 +02:00
schroda fbcc1fb91a Add optional options arg to all requests 2023-10-27 20:23:45 +02:00
schroda d3e15e9d3b Use gql for "subscriptions" 2023-10-27 20:23:45 +02:00
schroda b79fbcf71d Setup graphql subscriptions 2023-10-27 20:23:45 +02:00
schroda 6a1c302e45 Remove SWR 2023-10-27 20:23:44 +02:00
schroda 09f48c2c17 Use gql for "backups" 2023-10-27 20:23:44 +02:00
schroda e2f34f1f47 Use gql for "fetchMore" workaround
The "loading" and "networkStatus" state do not get correctly updated when e.g. calling "fetchMore".
This seems to happen because an abort signal is passed on every hook call.
Due to passing this signal, the passed args to the hook change, and thus, it looks like apollo considers this a completely new hook call.
By preventing the signal from being passed, the hook correctly updates these states, but, on the contrary, it is not possible to abort these requests anymore
2023-10-27 20:23:44 +02:00
schroda aad87463f3 [Codegen] Use gql for "loading chapters" 2023-10-27 20:23:44 +02:00
schroda 78049282a7 Use gql for "sources" - preferences 2023-10-27 20:23:05 +02:00
schroda 12dd973179 Use gql for "mangas" VI - source mangas filter 2023-10-27 20:23:05 +02:00
schroda 3297c7d96c Use gql for "mangas" V - update manga categories 2023-10-27 20:23:05 +02:00
schroda 87aef85683 Use gql for "mangas" IV - source mangas popular/latest 2023-10-27 20:23:04 +02:00
schroda 0a73496cba Use gql for "mangas" III - global search 2023-10-27 20:23:04 +02:00
schroda af9d49e5e9 Use gql for "mangas" II - category mangas 2023-10-27 20:23:04 +02:00
schroda 89dc053f00 Use gql for "mangas" I - get manga 2023-10-27 20:23:04 +02:00
schroda a5b4b95bce Use gql for "updater" 2023-10-27 20:23:03 +02:00
schroda 222f8f5c9b Use gql for "downloader" 2023-10-27 20:23:03 +02:00
schroda ca18e750bf Use gql for "categories" 2023-10-27 20:23:03 +02:00
schroda f0d55c01c8 Use gql for "updating chapters" 2023-10-27 20:23:03 +02:00
schroda c75e184c57 Use gql for "updating mangas" 2023-10-27 20:23:02 +02:00
schroda e1f338d013 Use gql for "sources" 2023-10-27 20:23:02 +02:00
schroda 4a80e18cd0 Use gql for "extensions" 2023-10-27 20:23:02 +02:00
schroda 81cfeedbba Use gql for "checkForUpdate" 2023-10-27 20:23:02 +02:00
schroda 59468bc568 Use gql for "about" 2023-10-27 20:23:01 +02:00
schroda 80cb06dfd5 Use gql for "global metadata" 2023-10-27 20:23:01 +02:00
schroda 181eb6c811 Add graphql logic to RequestManager 2023-10-27 20:23:01 +02:00
schroda a0b686497f Move "RestClient" in sub folder 2023-10-27 20:23:00 +02:00
schroda bffc1669e2 Move "RequestManager" in sub folder 2023-10-27 20:23:00 +02:00