mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Fix disambiguated with empty senderName
This commit is contained in:
parent
035359cb35
commit
101057520b
1 changed files with 6 additions and 13 deletions
|
@ -62,17 +62,10 @@ data class TimelineEvent(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getDisambiguatedDisplayName(): String {
|
fun getDisambiguatedDisplayName(): String {
|
||||||
val disambiguated = if (isUniqueDisplayName) {
|
return when {
|
||||||
senderName
|
senderName.isNullOrBlank() -> root.senderId ?: ""
|
||||||
} else {
|
isUniqueDisplayName -> senderName
|
||||||
senderName?.let { name ->
|
else -> "$senderName (${root.senderId})"
|
||||||
"$name (${root.senderId})"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return if (disambiguated.isNullOrBlank()) {
|
|
||||||
root.senderId ?: ""
|
|
||||||
} else {
|
|
||||||
disambiguated
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue