mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Create coroutine application scope
This commit is contained in:
@@ -2,6 +2,7 @@ package io.element.android.x.matrix
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
|
||||
|
||||
@@ -9,8 +10,8 @@ object MatrixInstance {
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private lateinit var instance: Matrix
|
||||
|
||||
fun init(context: Context) {
|
||||
instance = Matrix(GlobalScope, context)
|
||||
fun init(context: Context, coroutineScope: CoroutineScope) {
|
||||
instance = Matrix(coroutineScope, context)
|
||||
}
|
||||
|
||||
fun getInstance(): Matrix {
|
||||
|
||||
Reference in New Issue
Block a user