From 8f57c5834bc2704452024db597470b21348fae9e Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 7 Sep 2021 15:13:57 +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 --- app/src/main/java/io/legado/app/model/CacheBook.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/model/CacheBook.kt b/app/src/main/java/io/legado/app/model/CacheBook.kt index ddaf3aaa2..11f5478c4 100644 --- a/app/src/main/java/io/legado/app/model/CacheBook.kt +++ b/app/src/main/java/io/legado/app/model/CacheBook.kt @@ -162,7 +162,9 @@ class CacheBook(var bookSource: BookSource, var book: Book) { synchronized(this) { val chapterIndex = waitDownloadSet.firstOrNull() if (chapterIndex == null) { - cacheBookMap.remove(book.bookUrl) + if (onDownloadSet.isEmpty()) { + cacheBookMap.remove(book.bookUrl) + } return false } if (onDownloadSet.contains(chapterIndex)) {