mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
fix(download): Don't delay pause notification
This commit is contained in:
parent
12002f62cd
commit
f985ad6daa
1 changed files with 1 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
|||
package eu.kanade.tachiyomi.data.download
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import co.touchlab.kermit.Logger
|
||||
import com.hippo.unifile.UniFile
|
||||
|
@ -93,8 +92,6 @@ class Downloader(
|
|||
private val _queueState = MutableStateFlow<List<Download>>(emptyList())
|
||||
val queueState = _queueState.asStateFlow()
|
||||
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
/**
|
||||
* Notifier for the downloader state and progress.
|
||||
*/
|
||||
|
@ -158,7 +155,7 @@ class Downloader(
|
|||
}
|
||||
|
||||
if (isPaused && queueState.value.isNotEmpty()) {
|
||||
handler.postDelayed({ notifier.onDownloadPaused() }, 150)
|
||||
notifier.onDownloadPaused()
|
||||
} else {
|
||||
notifier.dismiss()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue