From 9ac1009e223d37a09300a53c778f51d88b7551fa Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 17 Jan 2025 00:52:54 +0100 Subject: [PATCH] Properly update reader desktop nav bar download button Did not update according to download updates due to not subscribing to the fragment changes Regression 257c0c8e101188c4da96c4b7e97292e959ff30c2 --- .../navigation/desktop/ReaderNavBarDesktopActions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/reader/components/overlay/navigation/desktop/ReaderNavBarDesktopActions.tsx b/src/modules/reader/components/overlay/navigation/desktop/ReaderNavBarDesktopActions.tsx index fdef1839..42276bae 100644 --- a/src/modules/reader/components/overlay/navigation/desktop/ReaderNavBarDesktopActions.tsx +++ b/src/modules/reader/components/overlay/navigation/desktop/ReaderNavBarDesktopActions.tsx @@ -28,7 +28,7 @@ import { userReaderStatePagesContext } from '@/modules/reader/contexts/state/Rea const DownloadButton = ({ currentChapter }: Required>) => { const { t } = useTranslation(); - const downloadChapter = Chapters.getDownloadStatusFromCache(currentChapter?.id ?? -1); + const downloadStatus = Chapters.useDownloadStatusFromCache(currentChapter?.id ?? -1); if (currentChapter && Chapters.isDownloaded(currentChapter)) { return ( @@ -40,8 +40,8 @@ const DownloadButton = ({ currentChapter }: Required; + if (downloadStatus) { + return ; } return (