fix:目录页面空白bug

pull/1884/head
Xwite 3 years ago
parent b1ff349cc5
commit a6fb244b55
  1. 8
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt

@ -296,14 +296,12 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
fun changeToLocalBook(bookUrl: String) { fun changeToLocalBook(bookUrl: String) {
appDb.bookDao.getBook(bookUrl)?.let { localBook -> appDb.bookDao.getBook(bookUrl)?.let { localBook ->
isImportBookOnLine = false
inBookshelf = true
LocalBook.mergeBook(localBook, bookData.value).let { LocalBook.mergeBook(localBook, bookData.value).let {
bookData.postValue(it) bookData.postValue(it)
loadChapter(it)
} }
LocalBook.getChapterList(localBook).let {
chapterListData.postValue(it)
}
isImportBookOnLine = false
inBookshelf = true
} }
} }

Loading…
Cancel
Save