forked from GitHub-Mirror/riotX-android
better code (ganfra's review)
This commit is contained in:
parent
56e0680398
commit
285da114e7
@ -56,13 +56,13 @@ data class TimelineEvent(
|
||||
|
||||
fun getDisambiguatedDisplayName(): String {
|
||||
return if (isUniqueDisplayName) {
|
||||
senderName ?: root.senderId
|
||||
senderName
|
||||
} else {
|
||||
senderName?.let {
|
||||
it + " (" + root.senderId + ")"
|
||||
senderName?.let { name ->
|
||||
"$name (${root.senderId})"
|
||||
}
|
||||
?: root.senderId
|
||||
}
|
||||
?: root.senderId
|
||||
?: ""
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user