mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 04:25:18 +00:00
Show current user in compound profile picture if needed
This commit is contained in:
parent
b6bf8ea561
commit
8f812d9ceb
@ -81,7 +81,11 @@ class ProfilePictureView : RelativeLayout {
|
||||
if (masterPublicKey != null) {
|
||||
users.remove(masterPublicKey)
|
||||
}
|
||||
val randomUsers = users.sorted() // Sort to provide a level of stability
|
||||
val randomUsers = users.sorted().toMutableList() // Sort to provide a level of stability
|
||||
if (users.count() == 1) {
|
||||
val userPublicKey = TextSecurePreferences.getLocalNumber(context)
|
||||
randomUsers.add(0, userPublicKey) // Ensure the current user is at the back visually
|
||||
}
|
||||
val pk = randomUsers.getOrNull(0) ?: ""
|
||||
publicKey = pk
|
||||
displayName = getUserDisplayName(pk)
|
||||
|
Loading…
Reference in New Issue
Block a user