mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -183,6 +183,9 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
|
||||
bookData.value!!.changeTo(newBook, toc)
|
||||
bookData.postValue(newBook)
|
||||
chapterListData.postValue(toc)
|
||||
if (inBookshelf) {
|
||||
appDb.bookChapterDao.insert(*toc.toTypedArray())
|
||||
}
|
||||
}.onFinally {
|
||||
postEvent(EventBus.SOURCE_CHANGED, newBook.bookUrl)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user