mirror of
https://github.com/gedoor/legado.git
synced 2024-07-04 23:36:56 +08:00
优化
This commit is contained in:
parent
9e5cefc47c
commit
0d63180dd0
|
@ -93,7 +93,7 @@ object ReadBook : CoroutineScope by MainScope() {
|
|||
readRecord.readTime = appDb.readRecordDao.getReadTime(book.name) ?: 0
|
||||
chapterSize = appDb.bookChapterDao.getChapterCount(book.bookUrl)
|
||||
contentProcessor = ContentProcessor.get(book)
|
||||
durChapterIndex = min(book.durChapterIndex, chapterSize - 1).coerceAtLeast(0)
|
||||
durChapterIndex = book.durChapterIndex
|
||||
durChapterPos = book.durChapterPos
|
||||
isLocalBook = book.isLocal
|
||||
clearTextChapter()
|
||||
|
|
|
@ -116,6 +116,9 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
|
|||
ReadBook.loadOrUpContent()
|
||||
checkLocalBookFileExist(book)
|
||||
} else {
|
||||
if (ReadBook.durChapterIndex > ReadBook.chapterSize - 1) {
|
||||
ReadBook.durChapterIndex = ReadBook.chapterSize - 1
|
||||
}
|
||||
ReadBook.loadContent(resetPageOffset = false)
|
||||
checkLocalBookFileExist(book)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user