Create coroutine application scope
This commit is contained in:
parent
0719dc53f2
commit
21228c23b2
2 changed files with 9 additions and 3 deletions
|
|
@ -3,14 +3,19 @@ package io.element.android.x
|
|||
import android.app.Application
|
||||
import com.airbnb.mvrx.Mavericks
|
||||
import io.element.android.x.matrix.MatrixInstance
|
||||
import kotlinx.coroutines.CoroutineName
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.plus
|
||||
import timber.log.Timber
|
||||
|
||||
class ElementXApplication : Application() {
|
||||
|
||||
private val applicationScope = MainScope() + CoroutineName("ElementX Scope")
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
Timber.plant(Timber.DebugTree())
|
||||
MatrixInstance.init(this)
|
||||
MatrixInstance.init(this, applicationScope)
|
||||
Mavericks.initialize(this)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue