mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 23:03:46 +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
|
populateUserHexEncodedPublicKeyCacheIfNeeded(thread.threadId, context) // FIXME: This is a terrible place to do this
|
||||||
unreadMessagesIndicatorView.visibility = if (thread.unreadCount > 0) View.VISIBLE else View.INVISIBLE
|
unreadMessagesIndicatorView.visibility = if (thread.unreadCount > 0) View.VISIBLE else View.INVISIBLE
|
||||||
if (thread.recipient.isGroupRecipient) {
|
if (thread.recipient.isGroupRecipient) {
|
||||||
val users = LokiAPI.userHexEncodedPublicKeyCache[thread.threadId]?.toList() ?: listOf()
|
if ("Session Public Chat" == thread.recipient.name) {
|
||||||
val randomUsers = users.sorted() // Sort to provide a level of stability
|
profilePictureView.hexEncodedPublicKey = ""
|
||||||
profilePictureView.hexEncodedPublicKey = randomUsers.getOrNull(0) ?: ""
|
profilePictureView.isRSSFeed = true
|
||||||
profilePictureView.additionalHexEncodedPublicKey = randomUsers.getOrNull(1) ?: ""
|
} else {
|
||||||
profilePictureView.isRSSFeed = thread.recipient.name == "Loki News" || thread.recipient.name == "Session Updates"
|
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 {
|
} else {
|
||||||
profilePictureView.hexEncodedPublicKey = thread.recipient.address.toString()
|
profilePictureView.hexEncodedPublicKey = thread.recipient.address.toString()
|
||||||
profilePictureView.additionalHexEncodedPublicKey = null
|
profilePictureView.additionalHexEncodedPublicKey = null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user