mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Clean
This commit is contained in:
parent
73c33ff096
commit
18ee21355c
@ -9,14 +9,10 @@ fun getOpenGroupDisplayName(recipient: Recipient, threadRecipient: Recipient, co
|
|||||||
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(threadRecipient)
|
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(threadRecipient)
|
||||||
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
val publicChat = DatabaseFactory.getLokiThreadDatabase(context).getPublicChat(threadID)
|
||||||
val hexEncodedPublicKey = recipient.address.toString()
|
val hexEncodedPublicKey = recipient.address.toString()
|
||||||
val displayName: String?
|
val displayName = if (publicChat != null) {
|
||||||
displayName = if (publicChat != null) {
|
|
||||||
DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, hexEncodedPublicKey)
|
DatabaseFactory.getLokiUserDatabase(context).getServerDisplayName(publicChat.id, hexEncodedPublicKey)
|
||||||
} else {
|
} else {
|
||||||
DatabaseFactory.getLokiUserDatabase(context).getDisplayName(hexEncodedPublicKey)
|
DatabaseFactory.getLokiUserDatabase(context).getDisplayName(hexEncodedPublicKey)
|
||||||
}
|
}
|
||||||
if (displayName == null) {
|
return displayName ?: hexEncodedPublicKey
|
||||||
return hexEncodedPublicKey
|
|
||||||
}
|
|
||||||
return displayName
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user