From 0c4ce2c9c50c1aa604931f7defab3fe667a50f26 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:50:49 +0200 Subject: [PATCH] Use cache to query chapters with state There is a potential that the cached chapters state is outdated, but this is a marginal issue and is preferred over sending a request to the server everytime for data that is most likely already known. The triggered downloads will also reflect what is currently shown in the UI, so it will most likely never be known if some chapter state was outdated. --- src/lib/requests/RequestManager.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/lib/requests/RequestManager.ts b/src/lib/requests/RequestManager.ts index 81f13e93..94846de7 100644 --- a/src/lib/requests/RequestManager.ts +++ b/src/lib/requests/RequestManager.ts @@ -1768,15 +1768,7 @@ export class RequestManager { states: Pick, options?: QueryOptions, ): AbortabaleApolloQueryResponse { - return this.doRequest( - GQLMethod.QUERY, - GET_MANGAS_CHAPTER_IDS_WITH_STATE, - { mangaIds, ...states }, - { - fetchPolicy: 'no-cache', - ...options, - }, - ); + return this.doRequest(GQLMethod.QUERY, GET_MANGAS_CHAPTER_IDS_WITH_STATE, { mangaIds, ...states }, options); } public getMangaChaptersFetch(