mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
fix: replicate the same display name logic as settings activity
This commit is contained in:
parent
68506ffcfa
commit
7d9f5bc46d
@ -202,7 +202,7 @@ class OpenGroupPoller(private val openGroup: OpenGroup, private val executorServ
|
|||||||
OpenGroupAPI.getDisplayNames(hexEncodedPublicKeys, openGroup.server).successBackground { mapping ->
|
OpenGroupAPI.getDisplayNames(hexEncodedPublicKeys, openGroup.server).successBackground { mapping ->
|
||||||
for (pair in mapping.entries) {
|
for (pair in mapping.entries) {
|
||||||
if (pair.key == userHexEncodedPublicKey) continue
|
if (pair.key == userHexEncodedPublicKey) continue
|
||||||
val senderDisplayName = "${pair.value} (...${pair.key.takeLast(8)})"
|
val senderDisplayName = "${pair.value} (...${pair.key.substring(pair.key.count() - 8)})"
|
||||||
MessagingConfiguration.shared.storage.setOpenGroupDisplayName(pair.key, openGroup.channel, openGroup.server, senderDisplayName)
|
MessagingConfiguration.shared.storage.setOpenGroupDisplayName(pair.key, openGroup.channel, openGroup.server, senderDisplayName)
|
||||||
}
|
}
|
||||||
}.fail {
|
}.fail {
|
||||||
|
Loading…
Reference in New Issue
Block a user