mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Fix Session Public Chat profile picture
This commit is contained in:
parent
acd0ba7465
commit
b84724409f
@ -49,11 +49,16 @@ class ConversationView : LinearLayout {
|
||||
populateUserHexEncodedPublicKeyCacheIfNeeded(thread.threadId, context) // FIXME: This is a terrible place to do this
|
||||
unreadMessagesIndicatorView.visibility = if (thread.unreadCount > 0) View.VISIBLE else View.INVISIBLE
|
||||
if (thread.recipient.isGroupRecipient) {
|
||||
val users = LokiAPI.userHexEncodedPublicKeyCache[thread.threadId]?.toList() ?: listOf()
|
||||
val randomUsers = users.sorted() // Sort to provide a level of stability
|
||||
profilePictureView.hexEncodedPublicKey = randomUsers.getOrNull(0) ?: ""
|
||||
profilePictureView.additionalHexEncodedPublicKey = randomUsers.getOrNull(1) ?: ""
|
||||
profilePictureView.isRSSFeed = thread.recipient.name == "Loki News" || thread.recipient.name == "Session Updates"
|
||||
if ("Session Public Chat" == thread.recipient.name) {
|
||||
profilePictureView.hexEncodedPublicKey = ""
|
||||
profilePictureView.isRSSFeed = true
|
||||
} else {
|
||||
val users = LokiAPI.userHexEncodedPublicKeyCache[thread.threadId]?.toList() ?: listOf()
|
||||
val randomUsers = users.sorted() // Sort to provide a level of stability
|
||||
profilePictureView.hexEncodedPublicKey = randomUsers.getOrNull(0) ?: ""
|
||||
profilePictureView.additionalHexEncodedPublicKey = randomUsers.getOrNull(1) ?: ""
|
||||
profilePictureView.isRSSFeed = thread.recipient.name == "Loki News" || thread.recipient.name == "Session Updates"
|
||||
}
|
||||
} else {
|
||||
profilePictureView.hexEncodedPublicKey = thread.recipient.address.toString()
|
||||
profilePictureView.additionalHexEncodedPublicKey = null
|
||||
|
Loading…
x
Reference in New Issue
Block a user