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 7f83bb9a0a the loading state was shown.
This commit is contained in:
schroda
2023-06-08 13:56:25 +02:00
committed by GitHub
parent 7f83bb9a0a
commit bbdbccf235

View File

@@ -107,7 +107,7 @@ export default function Reader() {
const { data: chapter = initialChapter, isLoading: isChapterLoading } = requestManager.useGetChapter( const { data: chapter = initialChapter, isLoading: isChapterLoading } = requestManager.useGetChapter(
mangaId, mangaId,
chapterIndex, chapterIndex,
{ disableCache: true }, { disableCache: true, revalidateOnFocus: false },
); );
const [wasLastPageReadSet, setWasLastPageReadSet] = useState(false); const [wasLastPageReadSet, setWasLastPageReadSet] = useState(false);
const [curPage, setCurPage] = useState<number>(0); const [curPage, setCurPage] = useState<number>(0);