修复web端进度更新后手机端进入阅读界面进度不变的bug

pull/302/head
gedoor 4 years ago
parent f23e1b85ba
commit 842db32be7
  1. 4
      app/src/main/java/io/legado/app/web/controller/BookshelfController.kt

@ -5,6 +5,7 @@ import io.legado.app.constant.PreferKey
import io.legado.app.data.entities.Book
import io.legado.app.help.BookHelp
import io.legado.app.model.WebBook
import io.legado.app.service.help.ReadBook
import io.legado.app.utils.GSON
import io.legado.app.utils.fromJsonObject
import io.legado.app.utils.getPrefInt
@ -91,6 +92,9 @@ object BookshelfController {
book.durChapterTitle = it.title
}
App.db.bookDao().update(book)
if (ReadBook.book?.bookUrl == book.bookUrl) {
ReadBook.book = book
}
}
}

Loading…
Cancel
Save