Skip to content

Commit

Permalink
Fix Retry Button (LNReader#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyd1 authored and CD-Z committed Jan 9, 2024
1 parent e0e3e66 commit 9b8903a
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 @@ -398,6 +398,7 @@ const ChapterContent = ({ route, navigation }) => {
iconName: 'refresh',
title: getString('common.retry'),
onPress: () => {
setError('');
setLoading(true);
getChapter(chapterId);
},
Expand Down

0 comments on commit 9b8903a

Please sign in to comment.