Improve: migrate to latest dependencies

This commit is contained in:
Kr328
2021-05-24 15:57:22 +08:00
parent 4f05ba1ac6
commit 27dc5395e0
31 changed files with 92 additions and 83 deletions

View File

@@ -1,8 +1,11 @@
package com.github.kr328.clash.common
import android.app.Application
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
object Global {
object Global : CoroutineScope by CoroutineScope(Dispatchers.IO) {
val application: Application
get() = application_
@@ -11,4 +14,8 @@ object Global {
fun init(application: Application) {
this.application_ = application
}
fun destroy() {
cancel()
}
}