From 184142c35c92e64e566be2c68db092d45e95bc7c Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 19 Aug 2019 11:49:33 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/changesource/ChangeSourceViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt index 7c77397d3..a1c8d5bd8 100644 --- a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt @@ -49,13 +49,14 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio .timeout(30000L) .onSuccess(Dispatchers.IO) { it?.let { list -> - list.map { searchBook -> + for (searchBook in list) { if (searchBook.name == name && searchBook.author == author) { if (searchBook.tocUrl.isEmpty()) { loadBookInfo(searchBook.toBook()) } else { loadChapter(searchBook.toBook()) } + break } } }