From 7b54ec6dacc0a53ad275420a0634fb7feafb031a Mon Sep 17 00:00:00 2001 From: Rajarshee Chatterjee Date: Sun, 7 Jan 2024 18:18:40 +0530 Subject: [PATCH] Reset Progress on Chapter End (Closes #791) --- src/screens/reader/ReaderScreen.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/screens/reader/ReaderScreen.js b/src/screens/reader/ReaderScreen.js index 7a41c39d72..1d45edd1c8 100644 --- a/src/screens/reader/ReaderScreen.js +++ b/src/screens/reader/ReaderScreen.js @@ -363,9 +363,10 @@ const ChapterContent = ({ route, navigation }) => { }; }, [position?.percentage]); - const scrollToSavedProgress = useCallback(() => { - scrollTo(position?.position); - }, []); + const scrollToSavedProgress = useCallback( + () => scrollTo(position?.position), + [], + ); const chapterText = useMemo( () =>