From 272601112651074d8f9418c4391e9eda72d42f0e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 14 Aug 2023 23:06:33 -0400 Subject: [PATCH] Trim display names when possible --- .../com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt index faccd59d9..81e3b968f 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt @@ -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) }