mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 20:08:50 +03:00
crypto: Use a background task to fetch user devices
This commit is contained in:
parent
cbed5be810
commit
3fa9fc5b7b
1 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,6 @@ import uniffi.olm.OlmMachine as InnerMachine
|
|||
import uniffi.olm.ProgressListener as RustProgressListener
|
||||
import uniffi.olm.Request
|
||||
import uniffi.olm.RequestType
|
||||
import uniffi.olm.Verification as InnerVerification
|
||||
import uniffi.olm.setLogger
|
||||
|
||||
class CryptoLogger : Logger {
|
||||
|
@ -462,7 +461,9 @@ internal class OlmMachine(
|
|||
*/
|
||||
@Throws(CryptoStoreErrorException::class)
|
||||
suspend fun getUserDevices(userId: String): List<CryptoDeviceInfo> {
|
||||
val devices = inner.getUserDevices(userId).map { toCryptoDeviceInfo(it) }.toMutableList()
|
||||
val devices = withContext(Dispatchers.IO) {
|
||||
inner.getUserDevices(userId).map { toCryptoDeviceInfo(it) }.toMutableList()
|
||||
}
|
||||
|
||||
// EA doesn't differentiate much between our own and other devices of
|
||||
// while the rust-sdk does, append our own device here.
|
||||
|
|
Loading…
Reference in a new issue