From dd57f397e0f77909874900d73c0390d16ef24e8a Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 7 Nov 2020 20:00:00 +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 --- .../legado/app/ui/book/changesource/ChangeSourceViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt index 1ed25cdfe..4076db17c 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceViewModel.kt @@ -157,7 +157,7 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio webBook.getBookInfo(book, this) .onSuccess { if (context.getPrefBoolean(PreferKey.changeSourceLoadToc)) { - loadChapter(webBook, book) + loadBookToc(webBook, book) } else { //从详情页里获取最新章节 book.latestChapterTitle = it.latestChapterTitle @@ -169,7 +169,7 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio } } - private fun loadChapter(webBook: WebBook, book: Book) { + private fun loadBookToc(webBook: WebBook, book: Book) { webBook.getChapterList(book, this) .onSuccess(IO) { chapters -> if (chapters.isNotEmpty()) {