From 88e03c1a0a982f7cd7c13969ebcd308b8666287c Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 10 Mar 2023 09:37:43 -0500 Subject: [PATCH] Removes Account observer from ChatroomCompose --- .../com/vitorpamplona/amethyst/ui/note/ChatroomCompose.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomCompose.kt index 48f2d9b9b..c0dd8c182 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomCompose.kt @@ -62,9 +62,6 @@ fun ChatroomCompose( val noteState by baseNote.live().metadata.observeAsState() val note = noteState?.note - val accountState by accountViewModel.accountLiveData.observeAsState() - val account = accountState?.account ?: return - val notificationCacheState = NotificationCache.live.observeAsState() val notificationCache = notificationCacheState.value ?: return @@ -145,7 +142,7 @@ fun ChatroomCompose( var userToComposeOn = note.author!! if (replyAuthorBase != null) { - if (note.author == account.userProfile()) { + if (note.author == accountViewModel.userProfile()) { userToComposeOn = replyAuthorBase } } @@ -170,7 +167,7 @@ fun ChatroomCompose( channelPicture = { UserPicture( userToComposeOn, - account.userProfile(), + accountViewModel.userProfile(), size = 55.dp ) },