mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 18:36:21 +03:00
Check trust on crypto thread
This commit is contained in:
parent
817dc19b9a
commit
bdb1df75d4
2 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
<option name="RIGHT_MARGIN" value="160" />
|
<option name="RIGHT_MARGIN" value="160" />
|
||||||
|
<AndroidXmlCodeStyleSettings>
|
||||||
|
<option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
|
||||||
|
</AndroidXmlCodeStyleSettings>
|
||||||
<JetCodeStyleSettings>
|
<JetCodeStyleSettings>
|
||||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||||
<value>
|
<value>
|
||||||
|
|
|
@ -22,6 +22,7 @@ import im.vector.matrix.android.internal.di.CryptoDatabase
|
||||||
import im.vector.matrix.android.internal.di.SessionDatabase
|
import im.vector.matrix.android.internal.di.SessionDatabase
|
||||||
import im.vector.matrix.android.internal.session.room.RoomSummaryUpdater
|
import im.vector.matrix.android.internal.session.room.RoomSummaryUpdater
|
||||||
import im.vector.matrix.android.internal.task.TaskExecutor
|
import im.vector.matrix.android.internal.task.TaskExecutor
|
||||||
|
import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers
|
||||||
import im.vector.matrix.android.internal.util.createBackgroundHandler
|
import im.vector.matrix.android.internal.util.createBackgroundHandler
|
||||||
import io.realm.Realm
|
import io.realm.Realm
|
||||||
import io.realm.RealmConfiguration
|
import io.realm.RealmConfiguration
|
||||||
|
@ -36,6 +37,7 @@ internal class ShieldTrustUpdater @Inject constructor(
|
||||||
private val eventBus: EventBus,
|
private val eventBus: EventBus,
|
||||||
private val computeTrustTask: ComputeTrustTask,
|
private val computeTrustTask: ComputeTrustTask,
|
||||||
private val taskExecutor: TaskExecutor,
|
private val taskExecutor: TaskExecutor,
|
||||||
|
private val coroutineDispatchers: MatrixCoroutineDispatchers,
|
||||||
@CryptoDatabase private val cryptoRealmConfiguration: RealmConfiguration,
|
@CryptoDatabase private val cryptoRealmConfiguration: RealmConfiguration,
|
||||||
@SessionDatabase private val sessionRealmConfiguration: RealmConfiguration,
|
@SessionDatabase private val sessionRealmConfiguration: RealmConfiguration,
|
||||||
private val roomSummaryUpdater: RoomSummaryUpdater
|
private val roomSummaryUpdater: RoomSummaryUpdater
|
||||||
|
@ -93,8 +95,7 @@ internal class ShieldTrustUpdater @Inject constructor(
|
||||||
if (!isStarted.get()) {
|
if (!isStarted.get()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
taskExecutor.executorScope.launch(coroutineDispatchers.crypto) {
|
||||||
taskExecutor.executorScope.launch {
|
|
||||||
val updatedTrust = computeTrustTask.execute(ComputeTrustTask.Params(update.userIds))
|
val updatedTrust = computeTrustTask.execute(ComputeTrustTask.Params(update.userIds))
|
||||||
// We need to send that back to session base
|
// We need to send that back to session base
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue