From d2818eead7de014a101e6798095b94bf9da86da3 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 27 Aug 2019 21:47:29 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt index f48537b9e..96a5711e0 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt @@ -209,6 +209,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { bookData.value?.let { App.db.bookDao().delete(it.bookUrl) } + App.db.bookDao().insert(book) bookData.postValue(book) bookSource = App.db.bookSourceDao().getBookSource(book.origin) if (book.tocUrl.isEmpty()) {