Create coroutine application scope

This commit is contained in:
ganfra 2022-11-10 16:28:06 +01:00
parent 0719dc53f2
commit 21228c23b2
2 changed files with 9 additions and 3 deletions

View file

@ -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)
}
}