From a83b4b1a328c54bfc95a42971ff7c833d93601ce Mon Sep 17 00:00:00 2001 From: nguyd1 <91645046+nguyd1@users.noreply.github.com> Date: Mon, 8 Jan 2024 00:47:03 -0800 Subject: [PATCH] Fix Retry Button (#879) --- src/screens/BrowseSourceScreen/useBrowseSource.ts | 3 +++ src/screens/reader/ReaderScreen.js | 1 + 2 files changed, 4 insertions(+) diff --git a/src/screens/BrowseSourceScreen/useBrowseSource.ts b/src/screens/BrowseSourceScreen/useBrowseSource.ts index fa41e9118..5b81e4909 100644 --- a/src/screens/BrowseSourceScreen/useBrowseSource.ts +++ b/src/screens/BrowseSourceScreen/useBrowseSource.ts @@ -55,6 +55,9 @@ export const useBrowseSource = ( }, [fetchNovels, currentPage]); const refetchNovels = () => { + isScreenMounted.current = true; + setError(''); + setIsLoading(true); setCurrentPage(1); fetchNovels(1); }; diff --git a/src/screens/reader/ReaderScreen.js b/src/screens/reader/ReaderScreen.js index 3dd8bb066..31ff88d57 100644 --- a/src/screens/reader/ReaderScreen.js +++ b/src/screens/reader/ReaderScreen.js @@ -368,6 +368,7 @@ const ChapterContent = ({ route, navigation }) => { iconName: 'refresh', title: getString('common.retry'), onPress: () => { + setError(''); setLoading(true); getChapter(chapterId); },