GlobalScope -> sessionScope

This commit is contained in:
Benoit Marty 2021-04-19 12:40:56 +02:00 committed by Benoit Marty
parent 0e563596dd
commit c33da38ddb
1 changed files with 1 additions and 3 deletions

View File

@ -21,8 +21,6 @@ import im.vector.app.R
import im.vector.app.core.di.ActiveSessionHolder
import im.vector.app.core.resources.StringProvider
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.api.pushrules.RuleIds
@ -52,7 +50,7 @@ class TestAccountSettings @Inject constructor(private val stringProvider: String
override fun doFix() {
if (manager?.diagStatus == TestStatus.RUNNING) return // wait before all is finished
GlobalScope.launch {
session.launch {
tryOrNull {
session.updatePushRuleEnableStatus(RuleKind.OVERRIDE, defaultRule, !defaultRule.enabled)
}