From 21ff7c8502fdb99cddfa1f7c0cdaf46c9f986570 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sat, 28 Feb 2026 12:21:46 -0500 Subject: [PATCH] avoids recreating modifiers --- .../java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt | 4 ++-- .../amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt | 3 ++- 2 files changed, 4 insertions(+), 3 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 58cc0a633..82b2b12e8 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 @@ -30,7 +30,6 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.defaultMinSize import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedButton import androidx.compose.material3.Text @@ -145,6 +144,7 @@ import com.vitorpamplona.amethyst.ui.theme.Font12SP import com.vitorpamplona.amethyst.ui.theme.HalfDoubleVertSpacer import com.vitorpamplona.amethyst.ui.theme.HalfPadding import com.vitorpamplona.amethyst.ui.theme.HalfStartPadding +import com.vitorpamplona.amethyst.ui.theme.Height4dpModifier import com.vitorpamplona.amethyst.ui.theme.RowColSpacing10dp import com.vitorpamplona.amethyst.ui.theme.RowColSpacing5dp import com.vitorpamplona.amethyst.ui.theme.Size10dp @@ -709,7 +709,7 @@ fun NoteBody( } if (baseNote.event !is RepostEvent && baseNote.event !is GenericRepostEvent) { - Spacer(modifier = Modifier.height(4.dp)) + Spacer(modifier = Height4dpModifier) } RenderNoteRow( diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt index 0630bd4e2..c7c2c5ea4 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt @@ -70,6 +70,7 @@ import com.vitorpamplona.amethyst.commons.chess.ChessSyncBanner import com.vitorpamplona.amethyst.commons.chess.LiveChessGameScreen import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel +import com.vitorpamplona.amethyst.ui.theme.Height4dpModifier import com.vitorpamplona.quartz.nip64Chess.ChessGameNameGenerator /** @@ -392,7 +393,7 @@ private fun RelaySettingsSheet( fontWeight = FontWeight.Bold, ) - Spacer(modifier = Modifier.height(4.dp)) + Spacer(modifier = Height4dpModifier) Text( text = gameId,