From bbdbccf235bd54af35b6b0de1de228ef986202ea Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 8 Jun 2023 13:56:25 +0200 Subject: [PATCH] Prevent chapter revalidation on focus event in the Reader (#359) This caused the reader to scroll back to the beginning of the current page. And with the latest changes of 7f83bb9a0a9413d5b469025d82baf7198e36451f the loading state was shown. --- src/screens/Reader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/Reader.tsx b/src/screens/Reader.tsx index 3410dbbb..38d5642f 100644 --- a/src/screens/Reader.tsx +++ b/src/screens/Reader.tsx @@ -107,7 +107,7 @@ export default function Reader() { const { data: chapter = initialChapter, isLoading: isChapterLoading } = requestManager.useGetChapter( mangaId, chapterIndex, - { disableCache: true }, + { disableCache: true, revalidateOnFocus: false }, ); const [wasLastPageReadSet, setWasLastPageReadSet] = useState(false); const [curPage, setCurPage] = useState(0);