diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt index 8303d8357..b60fbfa43 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt +++ b/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) { appDb.bookDao.getBook(bookUrl)?.let { localBook -> + isImportBookOnLine = false + inBookshelf = true LocalBook.mergeBook(localBook, bookData.value).let { bookData.postValue(it) + loadChapter(it) } - LocalBook.getChapterList(localBook).let { - chapterListData.postValue(it) - } - isImportBookOnLine = false - inBookshelf = true } }