Albirew/tachiyomi
Archivé
1
0
Bifurcation 0

Fix chapters with 1 page not marked as read

Cette révision appartient à :
len 2016-06-15 16:47:59 +02:00
Parent 5cfd5da338
révision 5ad06df4ac

Voir le fichier

@ -336,14 +336,19 @@ class ReaderPresenter : BasePresenter<ReaderActivity>() {
* over the chapter read like saving progress
*/
fun onChapterLeft() {
val pages = chapter.pages ?: return
// Reference these locally because they are needed later from another thread.
val chapter = chapter
val prevChapter = prevChapter
val pages = chapter.pages ?: return
Observable
.fromCallable {
// Chapters with 1 page don't trigger page changes, so mark them as read.
if (pages.size == 1) {
chapter.read = true
}
if (!chapter.isDownloaded) {
source.let { if (it is OnlineSource) it.savePageList(chapter, pages) }
}