From be931db1a0cb84719c2652ec11ecff5e821d3928 Mon Sep 17 00:00:00 2001 From: AndyBernie Date: Tue, 22 Sep 2020 12:49:28 +0800 Subject: [PATCH] update --- app/src/main/assets/updateLog.md | 1 + .../legado/app/ui/book/changesource/ChangeSourceViewModel.kt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 0e4cfb8b6..6b5ff9e46 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -5,6 +5,7 @@ **2020/09/21** * 修复规则解析bug +* 换源时无最新章节信息时可加载详情页来获取(默认关闭) **2020/09/20** * 优化正文搜索 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 6633a889d..0cbc1e2ee 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 @@ -121,8 +121,10 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio it.forEach { searchBook -> if (searchBook.name == name && searchBook.author == author) { if (searchBook.latestChapterTitle.isNullOrEmpty()) { - if (context.getPrefBoolean(PreferKey.changeSourceLoadInfo)) { + if (context.getPrefBoolean(PreferKey.changeSourceLoadInfo) || context.getPrefBoolean(PreferKey.changeSourceLoadToc)) { loadBookInfo(searchBook.toBook()) + } else { + searchFinish(searchBook) } } else { searchFinish(searchBook)