From 641ce206c2b9e7cc324a1af37b300fbf3ac62a64 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Mar 2021 14:48:27 +0100 Subject: [PATCH 1/2] Move change to correct release version (#3001) --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0dc1a5d3c2..6799af2383 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ Improvements 🙌: Bugfix 🐛: - Ensure message are decrypted in the room list after a clear cache + - Cross signing now works with servers with an explicit port in the servername Translations 🗣: - @@ -48,7 +49,6 @@ Bugfix 🐛: - Be robust if Event.type is missing (#2946) - Snappier message send status - Fix MainActivity display (#2927) - - Cross signing now works with servers with an explicit port in the servername Translations 🗣: - All string resources and translations have been moved to the application module. Weblate project for the SDK will be removed. From 9492887345ec1462cd8bcbdb09f655b532266e47 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Mar 2021 14:53:15 +0100 Subject: [PATCH 2/2] Restore call to clearUnavailableServersList() removed by mistake See https://github.com/vector-im/element-android/pull/3001#pullrequestreview-613195611 --- .../android/sdk/internal/crypto/DeviceListManager.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DeviceListManager.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DeviceListManager.kt index b6e48322b7..e5f1c011f8 100755 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DeviceListManager.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DeviceListManager.kt @@ -168,13 +168,17 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM * @param left the user ids list which left a room */ fun handleDeviceListsChanges(changed: Collection, left: Collection) { - Timber.v("## CRYPTO: handleDeviceListsChanges changed:$changed / left:$left") + Timber.v("## CRYPTO: handleDeviceListsChanges changed: ${changed.logLimit()} / left: ${left.logLimit()}") var isUpdated = false val deviceTrackingStatuses = cryptoStore.getDeviceTrackingStatuses().toMutableMap() + if (changed.isNotEmpty() || left.isNotEmpty()) { + clearUnavailableServersList() + } + for (userId in changed) { 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 isUpdated = true } @@ -182,7 +186,7 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM for (userId in left) { 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 isUpdated = true }