mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Restore call to clearUnavailableServersList() removed by mistake
See https://github.com/vector-im/element-android/pull/3001#pullrequestreview-613195611
This commit is contained in:
parent
641ce206c2
commit
9492887345
@ -168,13 +168,17 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM
|
|||||||
* @param left the user ids list which left a room
|
* @param left the user ids list which left a room
|
||||||
*/
|
*/
|
||||||
fun handleDeviceListsChanges(changed: Collection<String>, left: Collection<String>) {
|
fun handleDeviceListsChanges(changed: Collection<String>, left: Collection<String>) {
|
||||||
Timber.v("## CRYPTO: handleDeviceListsChanges changed:$changed / left:$left")
|
Timber.v("## CRYPTO: handleDeviceListsChanges changed: ${changed.logLimit()} / left: ${left.logLimit()}")
|
||||||
var isUpdated = false
|
var isUpdated = false
|
||||||
val deviceTrackingStatuses = cryptoStore.getDeviceTrackingStatuses().toMutableMap()
|
val deviceTrackingStatuses = cryptoStore.getDeviceTrackingStatuses().toMutableMap()
|
||||||
|
|
||||||
|
if (changed.isNotEmpty() || left.isNotEmpty()) {
|
||||||
|
clearUnavailableServersList()
|
||||||
|
}
|
||||||
|
|
||||||
for (userId in changed) {
|
for (userId in changed) {
|
||||||
if (deviceTrackingStatuses.containsKey(userId)) {
|
if (deviceTrackingStatuses.containsKey(userId)) {
|
||||||
Timber.v("## CRYPTO | invalidateUserDeviceList() : Marking device list outdated for $userId")
|
Timber.v("## CRYPTO | handleDeviceListsChanges() : Marking device list outdated for $userId")
|
||||||
deviceTrackingStatuses[userId] = TRACKING_STATUS_PENDING_DOWNLOAD
|
deviceTrackingStatuses[userId] = TRACKING_STATUS_PENDING_DOWNLOAD
|
||||||
isUpdated = true
|
isUpdated = true
|
||||||
}
|
}
|
||||||
@ -182,7 +186,7 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM
|
|||||||
|
|
||||||
for (userId in left) {
|
for (userId in left) {
|
||||||
if (deviceTrackingStatuses.containsKey(userId)) {
|
if (deviceTrackingStatuses.containsKey(userId)) {
|
||||||
Timber.v("## CRYPTO | invalidateUserDeviceList() : No longer tracking device list for $userId")
|
Timber.v("## CRYPTO | handleDeviceListsChanges() : No longer tracking device list for $userId")
|
||||||
deviceTrackingStatuses[userId] = TRACKING_STATUS_NOT_TRACKED
|
deviceTrackingStatuses[userId] = TRACKING_STATUS_NOT_TRACKED
|
||||||
isUpdated = true
|
isUpdated = true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user