Ability to skip error in downloader
parent
b1fa9d1d22
commit
1a7b1e7bdc
@ -1,26 +0,0 @@
|
|||||||
package org.koitharu.kotatsu.core.util.progress
|
|
||||||
|
|
||||||
import androidx.annotation.AnyThread
|
|
||||||
import kotlinx.coroutines.Job
|
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
|
||||||
import org.koitharu.kotatsu.download.ui.worker.PausingHandle
|
|
||||||
|
|
||||||
class PausingProgressJob<P>(
|
|
||||||
job: Job,
|
|
||||||
progress: StateFlow<P>,
|
|
||||||
private val pausingHandle: PausingHandle,
|
|
||||||
) : ProgressJob<P>(job, progress) {
|
|
||||||
|
|
||||||
@get:AnyThread
|
|
||||||
val isPaused: Boolean
|
|
||||||
get() = pausingHandle.isPaused
|
|
||||||
|
|
||||||
@AnyThread
|
|
||||||
suspend fun awaitResumed() = pausingHandle.awaitResumed()
|
|
||||||
|
|
||||||
@AnyThread
|
|
||||||
fun pause() = pausingHandle.pause()
|
|
||||||
|
|
||||||
@AnyThread
|
|
||||||
fun resume() = pausingHandle.resume()
|
|
||||||
}
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#000000"
|
||||||
|
android:pathData="M16,18H18V6H16M6,18L14.5,12L6,6V18Z" />
|
||||||
|
</vector>
|
||||||
Loading…
Reference in New Issue