more offline stuff/bugfixes

This commit is contained in:
Finnley Somdahl 2023-11-20 00:39:14 -06:00
parent 3dfcc9fc31
commit 4db301ca7a
29 changed files with 341 additions and 119 deletions

View file

@ -60,7 +60,7 @@ class MangaDownloaderService : Service() {
private val downloadJobs = mutableMapOf<String, Job>()
private val mutex = Mutex()
var isCurrentlyProcessing = false
private var isCurrentlyProcessing = false
override fun onBind(intent: Intent?): IBinder? {
// This is only required for bound services.
@ -78,7 +78,7 @@ class MangaDownloaderService : Service() {
setProgress(0, 0, false)
}
startForeground(NOTIFICATION_ID, builder.build())
registerReceiver(cancelReceiver, IntentFilter(ACTION_CANCEL_DOWNLOAD))
ContextCompat.registerReceiver(this, cancelReceiver, IntentFilter(ACTION_CANCEL_DOWNLOAD), ContextCompat.RECEIVER_NOT_EXPORTED)
}
override fun onDestroy() {