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 71b47f9f9..02b977df2 100644 --- a/app/src/main/java/io/legado/app/model/CacheBook.kt +++ b/app/src/main/java/io/legado/app/model/CacheBook.kt @@ -161,6 +161,7 @@ object CacheBook { fun stop() { waitDownloadSet.clear() isStopped = true + postEvent(EventBus.UP_DOWNLOAD, book.bookUrl) } @Synchronized @@ -171,6 +172,7 @@ object CacheBook { waitDownloadSet.add(i) } } + postEvent(EventBus.UP_DOWNLOAD, book.bookUrl) } @Synchronized diff --git a/app/src/main/java/io/legado/app/service/CacheBookService.kt b/app/src/main/java/io/legado/app/service/CacheBookService.kt index d15d07c1d..5289d8140 100644 --- a/app/src/main/java/io/legado/app/service/CacheBookService.kt +++ b/app/src/main/java/io/legado/app/service/CacheBookService.kt @@ -85,7 +85,6 @@ class CacheBookService : BaseService() { execute { val cacheBook = CacheBook.getOrCreate(bookUrl) ?: return@execute cacheBook.addDownload(start, end) - postEvent(EventBus.UP_DOWNLOAD, "") upNotification(CacheBook.downloadSummary) if (downloadJob == null) { download()