Skip to content

Commit

Permalink
Fix Retry Button (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyd1 authored Jan 8, 2024
1 parent 8a85f4e commit a83b4b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/screens/BrowseSourceScreen/useBrowseSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export const useBrowseSource = (
}, [fetchNovels, currentPage]);

const refetchNovels = () => {
isScreenMounted.current = true;
setError('');
setIsLoading(true);
setCurrentPage(1);
fetchNovels(1);
};
Expand Down
1 change: 1 addition & 0 deletions src/screens/reader/ReaderScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ const ChapterContent = ({ route, navigation }) => {
iconName: 'refresh',
title: getString('common.retry'),
onPress: () => {
setError('');
setLoading(true);
getChapter(chapterId);
},
Expand Down

0 comments on commit a83b4b1

Please sign in to comment.