mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
Improve: migrate to latest dependencies
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user