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 9830b865a..e5b7beab4 100644 --- a/app/src/main/java/io/legado/app/service/CacheBookService.kt +++ b/app/src/main/java/io/legado/app/service/CacheBookService.kt @@ -58,7 +58,7 @@ class CacheBookService : BaseService() { intent.getIntExtra("end", 0) ) IntentAction.remove -> removeDownload(intent.getStringExtra("bookUrl")) - IntentAction.stop -> stopDownload() + IntentAction.stop -> stopSelf() } } return super.onStartCommand(intent, flags, startId) @@ -97,13 +97,6 @@ class CacheBookService : BaseService() { } } - private fun stopDownload() { - CacheBook.cacheBookMap.forEach { - it.value.waitDownloadSet.clear() - } - stopSelf() - } - private fun upNotificationContent() { notificationContent = "正在下载:${CacheBook.onDownloadCount}/等待中:${CacheBook.waitDownloadCount}/成功:${CacheBook.successDownloadCount}"