mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-20 05:10:16 +01:00
Fix persistent "group members have the same name" banner.
The hash calculation for name collisions iterated over a Set with undefined order, causing inconsistent hashes and resetting the dismissed state.
This commit is contained in:
@@ -392,7 +392,7 @@ class NameCollisionTables(
|
||||
|
||||
return try {
|
||||
val digest = MessageDigest.getInstance("MD5")
|
||||
val names = collisionRecipients.map { it.recipient.getDisplayName(context) }
|
||||
val names = collisionRecipients.map { it.recipient.getDisplayName(context) }.sorted()
|
||||
names.forEach { digest.update(it.encodeToByteArray()) }
|
||||
Hex.toStringCondensed(digest.digest())
|
||||
} catch (e: NoSuchAlgorithmException) {
|
||||
|
||||
Reference in New Issue
Block a user