From 8f73a37a533bbcacbd18c3255e151ab8c0c51af5 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sat, 28 Feb 2026 12:29:33 -0500 Subject: [PATCH] Fixes wrapping a non-observable value --- .../vitorpamplona/amethyst/ui/note/NoteCompose.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt index 5f0f19c6a..c2da8f66e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt @@ -37,7 +37,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.MutableState import androidx.compose.runtime.State -import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -1381,9 +1380,10 @@ fun FirstUserInfoRow( if (isDraft) { ObserveDraftEvent(baseNote, accountViewModel) { draftNote -> - val isCommunityPost by remember(draftNote) { - derivedStateOf { draftNote.event?.isACommunityPost() == true } - } + val isCommunityPost = + remember(draftNote) { + draftNote.event?.isACommunityPost() == true + } if (isCommunityPost) { DisplayFollowingCommunityInPost(draftNote, accountViewModel, nav) @@ -1392,9 +1392,10 @@ fun FirstUserInfoRow( } } } else { - val isCommunityPost by remember(baseNote) { - derivedStateOf { baseNote.event?.isACommunityPost() == true } - } + val isCommunityPost = + remember(baseNote) { + baseNote.event?.isACommunityPost() == true + } if (isCommunityPost) { DisplayFollowingCommunityInPost(baseNote, accountViewModel, nav)