From f6daceb5c3c0bf0283a7c7a07f22872f44f14121 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 2 Feb 2020 21:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index 553ab5ede..bb4ef95f0 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -99,6 +99,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { if (book.isLocalBook()) { AnalyzeTxtFile.analyze(context, book).let { App.db.bookChapterDao().insert(*it.toTypedArray()) + App.db.bookDao().update(book) ReadBook.chapterSize = it.size ReadBook.loadContent() } @@ -108,6 +109,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { if (!cList.isNullOrEmpty()) { if (changeDruChapterIndex == null) { App.db.bookChapterDao().insert(*cList.toTypedArray()) + App.db.bookDao().update(book) ReadBook.chapterSize = cList.size ReadBook.loadContent() } else {