Trim display names when possible

pull/549/head
Vitor Pamplona 2023-08-14 23:06:33 -04:00
rodzic 77bd646b1d
commit 2726011126
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -75,11 +75,11 @@ private fun UserNameDisplay(
fontWeight: FontWeight = FontWeight.Bold
) {
if (bestUserName != null && bestDisplayName != null && bestDisplayName != bestUserName) {
UserAndUsernameDisplay(bestDisplayName, tags, bestUserName, modifier, showPlayButton, fontWeight)
UserAndUsernameDisplay(bestDisplayName.trim(), tags, bestUserName.trim(), modifier, showPlayButton, fontWeight)
} else if (bestDisplayName != null) {
UserDisplay(bestDisplayName, tags, modifier, showPlayButton, fontWeight)
UserDisplay(bestDisplayName.trim(), tags, modifier, showPlayButton, fontWeight)
} else if (bestUserName != null) {
UserDisplay(bestUserName, tags, modifier, showPlayButton, fontWeight)
UserDisplay(bestUserName.trim(), tags, modifier, showPlayButton, fontWeight)
} else {
NPubDisplay(npubDisplay, modifier, fontWeight)
}