mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 21:10:02 +03:00
Fix crash discovered thanks to integration tests
This commit is contained in:
parent
1a6d4d0b03
commit
b03b6bfc37
1 changed files with 5 additions and 1 deletions
|
@ -80,6 +80,7 @@ import im.vector.matrix.android.internal.util.JsonCanonicalizer
|
||||||
import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers
|
import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers
|
||||||
import im.vector.matrix.android.internal.util.awaitCallback
|
import im.vector.matrix.android.internal.util.awaitCallback
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.matrix.olm.OlmException
|
import org.matrix.olm.OlmException
|
||||||
|
@ -809,7 +810,10 @@ internal class DefaultKeysBackupService @Inject constructor(
|
||||||
// new key is sent
|
// new key is sent
|
||||||
val delayInMs = Random.nextLong(KEY_BACKUP_WAITING_TIME_TO_SEND_KEY_BACKUP_MILLIS)
|
val delayInMs = Random.nextLong(KEY_BACKUP_WAITING_TIME_TO_SEND_KEY_BACKUP_MILLIS)
|
||||||
|
|
||||||
uiHandler.postDelayed({ backupKeys() }, delayInMs)
|
cryptoCoroutineScope.launch {
|
||||||
|
delay(delayInMs)
|
||||||
|
uiHandler.post { backupKeys() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
Timber.v("maybeBackupKeys: Skip it because state: $state")
|
Timber.v("maybeBackupKeys: Skip it because state: $state")
|
||||||
|
|
Loading…
Add table
Reference in a new issue