mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +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:
committed by
jeffrey-signal
parent
305c32cfc5
commit
8cd0381df5
@@ -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