mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-03 12:37:31 +01:00
crypto: Use a concurrent hashmap for the live devices update logic
This commit is contained in:
parent
74a1c226a4
commit
188d2d57c0
@ -19,6 +19,7 @@ package org.matrix.android.sdk.internal.crypto
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import java.io.File
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.listeners.ProgressListener
|
||||
@ -125,7 +126,7 @@ class Device(inner: InnerDevice, machine: InnerMachine) {
|
||||
}
|
||||
|
||||
internal class DeviceUpdateObserver() {
|
||||
internal val listeners = HashMap<LiveDevice, List<String>>()
|
||||
internal val listeners = ConcurrentHashMap<LiveDevice, List<String>>()
|
||||
|
||||
fun addDeviceUpdateListener(device: LiveDevice) {
|
||||
listeners.set(device, device.userIds)
|
||||
|
Loading…
x
Reference in New Issue
Block a user