|
|
@@ -11,6 +11,7 @@ import io.legado.app.data.entities.rule.TocRule
|
|
|
import io.legado.app.exception.NoStackTraceException
|
|
|
import io.legado.app.exception.TocEmptyException
|
|
|
import io.legado.app.help.book.ContentProcessor
|
|
|
+import io.legado.app.help.book.readSimulating
|
|
|
import io.legado.app.help.book.simulatedTotalChapterNum
|
|
|
import io.legado.app.help.config.AppConfig
|
|
|
import io.legado.app.model.Debug
|
|
|
@@ -145,9 +146,13 @@ object BookChapterList {
|
|
|
}
|
|
|
}
|
|
|
val replaceRules = ContentProcessor.get(book.name, book.origin).getTitleReplaceRules()
|
|
|
+ val lastChapter = if (book.readSimulating()) {
|
|
|
+ list.getOrElse(book.simulatedTotalChapterNum() - 1) { list.last() }
|
|
|
+ } else {
|
|
|
+ list.last()
|
|
|
+ }
|
|
|
book.latestChapterTitle =
|
|
|
- list.getOrElse(book.simulatedTotalChapterNum() - 1) {
|
|
|
- list.last() }.getDisplayTitle(replaceRules, book.getUseReplaceRule())
|
|
|
+ lastChapter.getDisplayTitle(replaceRules, book.getUseReplaceRule())
|
|
|
book.durChapterTitle = list.getOrElse(book.durChapterIndex) { list.last() }
|
|
|
.getDisplayTitle(replaceRules, book.getUseReplaceRule())
|
|
|
if (book.totalChapterNum < list.size) {
|