From 621dd557d3b67ac5ba54772774347f2e1a849dd6 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 21 Aug 2021 19:55:20 +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 --- .../io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt | 1 + .../legado/app/ui/book/changesource/ChangeSourceViewModel.kt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt index b73644267..0e2ed6a3a 100644 --- a/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt @@ -137,6 +137,7 @@ class ChangeCoverViewModel(application: Application) : BaseViewModel(application ) ) { searchStateData.postValue(false) + tasks.clear() } } 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 9c998e1a8..353f96a1a 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 @@ -163,10 +163,13 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio || searchIndex >= bookSourceList.lastIndex + threadCount ) { searchStateData.postValue(false) + tasks.clear() } } + } tasks.add(task) + } private fun loadBookInfo(webBook: WebBook, book: Book) {