mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 21:53:01 +02:00
Trim display names when possible
This commit is contained in:
@@ -75,11 +75,11 @@ private fun UserNameDisplay(
|
|||||||
fontWeight: FontWeight = FontWeight.Bold
|
fontWeight: FontWeight = FontWeight.Bold
|
||||||
) {
|
) {
|
||||||
if (bestUserName != null && bestDisplayName != null && bestDisplayName != bestUserName) {
|
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) {
|
} else if (bestDisplayName != null) {
|
||||||
UserDisplay(bestDisplayName, tags, modifier, showPlayButton, fontWeight)
|
UserDisplay(bestDisplayName.trim(), tags, modifier, showPlayButton, fontWeight)
|
||||||
} else if (bestUserName != null) {
|
} else if (bestUserName != null) {
|
||||||
UserDisplay(bestUserName, tags, modifier, showPlayButton, fontWeight)
|
UserDisplay(bestUserName.trim(), tags, modifier, showPlayButton, fontWeight)
|
||||||
} else {
|
} else {
|
||||||
NPubDisplay(npubDisplay, modifier, fontWeight)
|
NPubDisplay(npubDisplay, modifier, fontWeight)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user