From 1d63b44bef8b66240112b88e0e22416c12b6b53e Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 10 Jul 2020 11:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=AF=B4=E9=98=85=E8=AF=BB=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E4=BC=98=E5=8C=96=20=E6=B7=BB=E5=8A=A0=20epub=20?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 53b7366b9..943106d2b 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 @@ -10,7 +10,6 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.help.BookHelp import io.legado.app.model.WebBook -import io.legado.app.model.localBook.AnalyzeTxtFile import io.legado.app.model.localBook.LocalBook import io.legado.app.service.help.ReadBook import kotlinx.coroutines.Dispatchers.IO @@ -82,7 +81,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) { ) { execute { if (book.isLocalBook()) { - AnalyzeTxtFile().analyze(context, book).let { + LocalBook.getChapterList(book).let { App.db.bookDao().update(book) App.db.bookChapterDao().insert(*it.toTypedArray()) chapterListData.postValue(it)