Fix reader mark as read

This commit is contained in:
Syer10
2022-12-27 16:00:27 -05:00
parent 0c58727dd5
commit 2e282615e0

View File

@@ -303,7 +303,7 @@ class ReaderMenuViewModel @Inject constructor(
_currentPage
.onEach { index ->
(_pages.value.getOrNull(_currentPage.value - 1) as? ReaderPage)?.let { chapter.pageLoader?.loadPage(it) }
if (index == _pages.value.size) {
if (index == _pages.value.lastIndex) {
markChapterRead(chapter)
}
}