Introduce coroutines. Fix #1027. Lower notification channels' importance

This commit is contained in:
len
2017-10-13 00:12:29 +02:00
parent d97aff85b3
commit 4abd2d709f
6 changed files with 70 additions and 56 deletions

View File

@@ -0,0 +1,13 @@
package eu.kanade.tachiyomi.util
import kotlinx.coroutines.experimental.CoroutineScope
import kotlinx.coroutines.experimental.CoroutineStart
import kotlinx.coroutines.experimental.Job
import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.launch
fun launchUI(block: suspend CoroutineScope.() -> Unit): Job =
launch(UI, CoroutineStart.DEFAULT, block)
fun launchNow(block: suspend CoroutineScope.() -> Unit): Job =
launch(UI, CoroutineStart.UNDISPATCHED, block)