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.
This commit is contained in:
@@ -1768,15 +1768,7 @@ export class RequestManager {
|
||||
states: Pick<ChapterConditionInput, 'isRead' | 'isDownloaded' | 'isBookmarked'>,
|
||||
options?: QueryOptions<GetMangasChapterIdsWithStateQueryVariables, GetMangasChapterIdsWithStateQuery>,
|
||||
): AbortabaleApolloQueryResponse<GetMangasChapterIdsWithStateQuery> {
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user