修复章节跳转进度无法恢复

pull/2427/head
Xwite 2 years ago
parent 16b20edd4c
commit 0e24e62c70
  1. 1
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -1171,6 +1171,7 @@ class ReadBookActivity : BaseReadBookActivity(),
/* 进度条跳转到指定章节 */
override fun skipToChapter(index: Int) {
ReadBook.saveCurrentBookProcess() //退出章节跳转恢复此时进度
viewModel.openChapter(index)
}

@ -375,13 +375,11 @@ class ReadMenu @JvmOverloads constructor(
"page" -> ReadBook.skipToPage(seekBar.progress)
"chapter" -> {
if (confirmSkipToChapter) {
ReadBook.saveCurrentBookProcess()
callBack.skipToChapter(seekBar.progress)
} else {
context.alert("章节跳转确认", "确定要跳转章节吗?") {
yesButton {
confirmSkipToChapter = true
ReadBook.saveCurrentBookProcess()
callBack.skipToChapter(seekBar.progress)
}
noButton {

Loading…
Cancel
Save