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 } } }