diff --git a/lib/src/features/manga_book/presentation/reader/reader_screen.dart b/lib/src/features/manga_book/presentation/reader/reader_screen.dart index c7e26b8f..dfe1c5b5 100644 --- a/lib/src/features/manga_book/presentation/reader/reader_screen.dart +++ b/lib/src/features/manga_book/presentation/reader/reader_screen.dart @@ -41,14 +41,14 @@ class ReaderScreen extends HookConsumerWidget { final chapterValue = chapter.valueOrNull; final isReadingCompeted = chapterValue != null && ((chapterValue.read).ifNull() || - (currentPage > + (currentPage >= ((chapterValue.pageCount).ifNullOrNegative() - 1))); await AsyncValue.guard( () => ref.read(mangaBookRepositoryProvider).putChapter( mangaId: mangaId, chapterIndex: chapterIndex, patch: ChapterPut( - lastPageRead: currentPage, + lastPageRead: isReadingCompeted ? 0 : currentPage, read: isReadingCompeted, ), ), diff --git a/pubspec.yaml b/pubspec.yaml index c83976ff..ae6d99bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: tachidesk_sorayomi description: A new Flutter frontend for Tachidesk. publish_to: "none" -version: 0.3.3+1 +version: 0.3.4+1 environment: sdk: ">=2.18.1 <3.0.0"