From e76de477a33bf07845be40955ad4be029bbc19b8 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Wed, 15 Jul 2026 01:03:19 +0200 Subject: [PATCH] Fix chapter cards showing outdated download info after queue clear In case clearing the download queue caused the subscription to omit items, the received items did not get removed from the cache. This resulted in the DownloadStateIndicator to show outdated download info. --- CHANGELOG.md | 1 + src/lib/requests/RequestManager.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7640c8ff..6f05fbaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Manga/Library**) Fix delete/download option not being disabled for manga without any chapters - (**Source**) Fix changing configuration settings with multi option selection where a selected option does not exist anymore. (E.g. Komgas "Default libraries" setting, still having a library selected that has been deleted) - (**Download**) Fix not respecting chapter list filters for downloads +- (**Download**) Fix showing outdated download info in for some chapter cards after clearing the download queue ## [20260509.01] (r3147) - 2026-05-09 diff --git a/src/lib/requests/RequestManager.ts b/src/lib/requests/RequestManager.ts index cb7834a3..ac5f336f 100644 --- a/src/lib/requests/RequestManager.ts +++ b/src/lib/requests/RequestManager.ts @@ -3555,8 +3555,15 @@ export class RequestManager { const { cache } = this.graphQLClient.client; if (downloadChanged?.omittedUpdates) { + const cacheData = (cache as InMemoryCache).extract(); + this.graphQLClient.client.refetchQueries({ updateCache() { + for (const [id, value] of Object.entries(cacheData)) { + if ((value as any)?.__typename === 'DownloadType') { + cache.evict({ id }); + } + } cache.evict({ id: 'DownloadStatus:{}' }); cache.evict({ fieldName: 'downloadStatus' }); },