diff --git a/app/src/main/java/io/legado/app/service/help/ReadBook.kt b/app/src/main/java/io/legado/app/service/help/ReadBook.kt index d008ad7e9..ef15098b0 100644 --- a/app/src/main/java/io/legado/app/service/help/ReadBook.kt +++ b/app/src/main/java/io/legado/app/service/help/ReadBook.kt @@ -40,7 +40,6 @@ object ReadBook { fun resetData(book: Book) { this.book = book - titleDate.postValue(book.name) durChapterIndex = book.durChapterIndex durPageIndex = book.durChapterPos isLocalBook = book.origin == BookType.local @@ -48,11 +47,11 @@ object ReadBook { prevTextChapter = null curTextChapter = null nextTextChapter = null + titleDate.postValue(book.name) upWebBook(book) } - fun upWebBook(book: Book?) { - book ?: return + fun upWebBook(book: Book) { webBook = if (book.origin == BookType.local) { null } else {