pull/401/head
gedoor 4 years ago
parent 36f3af6852
commit 03bc45ee9a
  1. 2
      app/src/main/java/io/legado/app/service/DownloadService.kt

@ -69,11 +69,9 @@ class DownloadService : BaseService() {
IntentAction.stop -> { IntentAction.stop -> {
val downloadId = intent.getLongExtra("downloadId", 0) val downloadId = intent.getLongExtra("downloadId", 0)
downloads.remove(downloadId) downloads.remove(downloadId)
if (downloads.isEmpty()) {
stopSelf() stopSelf()
} }
} }
}
return super.onStartCommand(intent, flags, startId) return super.onStartCommand(intent, flags, startId)
} }

Loading…
Cancel
Save