feat: 优化

pull/241/head
gedoor 5 years ago
parent 2bf9a57963
commit 249544d2b1
  1. 5
      app/src/main/java/io/legado/app/service/help/ReadBook.kt

@ -40,7 +40,6 @@ object ReadBook {
fun resetData(book: Book) { fun resetData(book: Book) {
this.book = book this.book = book
titleDate.postValue(book.name)
durChapterIndex = book.durChapterIndex durChapterIndex = book.durChapterIndex
durPageIndex = book.durChapterPos durPageIndex = book.durChapterPos
isLocalBook = book.origin == BookType.local isLocalBook = book.origin == BookType.local
@ -48,11 +47,11 @@ object ReadBook {
prevTextChapter = null prevTextChapter = null
curTextChapter = null curTextChapter = null
nextTextChapter = null nextTextChapter = null
titleDate.postValue(book.name)
upWebBook(book) upWebBook(book)
} }
fun upWebBook(book: Book?) { fun upWebBook(book: Book) {
book ?: return
webBook = if (book.origin == BookType.local) { webBook = if (book.origin == BookType.local) {
null null
} else { } else {

Loading…
Cancel
Save