mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 11:24:35 -05:00
Correctly handle download of new chapters of not started entries (#755)
The function incorrectly exited early in case no latest read chapter was found. This rendered disabling the setting "excludeEntryWithUnreadChapters" useless.
This commit is contained in:
@@ -264,7 +264,7 @@ object Chapter {
|
|||||||
|
|
||||||
// make sure to only consider the latest chapters. e.g. old unread chapters should be ignored
|
// make sure to only consider the latest chapters. e.g. old unread chapters should be ignored
|
||||||
val latestReadChapterIndex =
|
val latestReadChapterIndex =
|
||||||
updatedChapterList.indexOfFirst { it[ChapterTable.isRead] }.takeIf { it > -1 } ?: return
|
updatedChapterList.indexOfFirst { it[ChapterTable.isRead] }.takeIf { it > -1 } ?: (updatedChapterList.size - 1)
|
||||||
val unreadChapters =
|
val unreadChapters =
|
||||||
updatedChapterList.subList(numberOfNewChapters, latestReadChapterIndex)
|
updatedChapterList.subList(numberOfNewChapters, latestReadChapterIndex)
|
||||||
.filter { !it[ChapterTable.isRead] }
|
.filter { !it[ChapterTable.isRead] }
|
||||||
|
|||||||
Reference in New Issue
Block a user