优化
This commit is contained in:
@@ -184,16 +184,20 @@ object ReadBook : CoroutineScope by MainScope() {
|
|||||||
curTextChapter = nextTextChapter
|
curTextChapter = nextTextChapter
|
||||||
nextTextChapter = null
|
nextTextChapter = null
|
||||||
if (curTextChapter == null) {
|
if (curTextChapter == null) {
|
||||||
|
AppLog.putDebug("moveToNextChapter-章节未加载,开始加载")
|
||||||
loadContent(durChapterIndex, upContent, false)
|
loadContent(durChapterIndex, upContent, false)
|
||||||
} else if (upContent) {
|
} else if (upContent) {
|
||||||
|
AppLog.putDebug("moveToNextChapter-章节已加载,刷新视图")
|
||||||
callBack?.upContent()
|
callBack?.upContent()
|
||||||
}
|
}
|
||||||
loadContent(durChapterIndex.plus(1), upContent, false)
|
loadContent(durChapterIndex.plus(1), upContent, false)
|
||||||
saveRead()
|
saveRead()
|
||||||
callBack?.upMenuView()
|
callBack?.upMenuView()
|
||||||
|
AppLog.putDebug("moveToNextChapter-curPageChanged()")
|
||||||
curPageChanged()
|
curPageChanged()
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
AppLog.putDebug("跳转下一章失败,没有下一章")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -441,6 +441,7 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
|
|
||||||
open fun nextChapter() {
|
open fun nextChapter() {
|
||||||
ReadBook.upReadTime()
|
ReadBook.upReadTime()
|
||||||
|
AppLog.putDebug("${ReadBook.curTextChapter?.chapter?.title} 朗读结束跳转下一章并朗读")
|
||||||
if (!ReadBook.moveToNextChapter(true)) {
|
if (!ReadBook.moveToNextChapter(true)) {
|
||||||
stopSelf()
|
stopSelf()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user