From 4cd24e5363fc3566b6213387858900b04bf0e71e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 1 Aug 2025 09:57:33 -0400 Subject: [PATCH] No need for not null checks --- amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt | 2 -- .../java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt index 414abd6bb..fe3c2f44d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/User.kt @@ -92,8 +92,6 @@ class User( fun toNostrUri() = "nostr:${toNProfile()}" - override fun toString(): String = pubkeyHex - fun toBestShortFirstName(): String { val fullName = toBestDisplayName() diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt index 1e45e7539..e403f4796 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UsernameDisplay.kt @@ -88,7 +88,7 @@ fun WatchAuthorWithBlank( inner(noteAuthor) } else { val authorState by observeNote(baseNote, accountViewModel) - CrossfadeIfEnabled(targetState = authorState?.note?.author, modifier = modifier, label = "WatchAuthorWithBlank", accountViewModel = accountViewModel) { newAuthor -> + CrossfadeIfEnabled(targetState = authorState.note.author, modifier = modifier, label = "WatchAuthorWithBlank", accountViewModel = accountViewModel) { newAuthor -> inner(newAuthor) } }