mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-16 15:09:18 +01:00
Fix coroutine deprecations again
This commit is contained in:
parent
934a37c36b
commit
fa59b4f8a7
@ -94,7 +94,7 @@ internal class ExtensionInstallReceiver(private val listener: Listener) :
|
||||
private suspend fun getExtensionFromIntent(context: Context, intent: Intent?): LoadResult {
|
||||
val pkgName = getPackageNameFromIntent(intent) ?:
|
||||
return LoadResult.Error("Package name not found")
|
||||
return GlobalScope.async(Dispatchers.Default, CoroutineStart.DEFAULT, null, { ExtensionLoader.loadExtensionFromPkgName(context, pkgName) }).await()
|
||||
return GlobalScope.async(Dispatchers.Default, CoroutineStart.DEFAULT, { ExtensionLoader.loadExtensionFromPkgName(context, pkgName) }).await()
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@ import kotlinx.coroutines.experimental.*
|
||||
import kotlinx.coroutines.experimental.android.Main
|
||||
|
||||
fun launchUI(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
GlobalScope.launch(Dispatchers.Main, CoroutineStart.DEFAULT, null, block)
|
||||
GlobalScope.launch(Dispatchers.Main, CoroutineStart.DEFAULT, block)
|
||||
|
||||
fun launchNow(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
GlobalScope.launch(Dispatchers.Main, CoroutineStart.UNDISPATCHED, null, block)
|
||||
GlobalScope.launch(Dispatchers.Main, CoroutineStart.UNDISPATCHED, block)
|
||||
|
Loading…
Reference in New Issue
Block a user