From 297f202005100d79fd8478e9c8431b6075728350 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 5 Jun 2019 23:42:08 +0200 Subject: [PATCH] Fix / Local echo taking too much time --- .../internal/session/room/EventRelationsAggregationTask.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/EventRelationsAggregationTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/EventRelationsAggregationTask.kt index a66b65ab..e5fb5493 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/EventRelationsAggregationTask.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/EventRelationsAggregationTask.kt @@ -28,6 +28,7 @@ import im.vector.matrix.android.internal.database.query.create import im.vector.matrix.android.internal.database.query.where import im.vector.matrix.android.internal.task.Task import im.vector.matrix.android.internal.util.tryTransactionAsync +import im.vector.matrix.android.internal.util.tryTransactionSync import io.realm.Realm import timber.log.Timber @@ -48,7 +49,7 @@ internal class DefaultEventRelationsAggregationTask(private val monarchy: Monarc private val SHOULD_HANDLE_SERVER_AGREGGATION = false override fun execute(params: EventRelationsAggregationTask.Params): Try { - return monarchy.tryTransactionAsync { realm -> + return monarchy.tryTransactionSync { realm -> update(realm, params.events, params.userId) } }