From 76dd0a0f16c17a6544e287ae5b024cb3f3a5aa18 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Jul 2026 21:11:34 +0000 Subject: [PATCH] fix: size accepted-by-relays icons to match gallery author pictures The relay favicons rendered at 17dp while the zap/boost/reaction gallery rows use 35dp author pictures, so the "accepted by relays" line looked out of scale. Parameterize RenderRelay with a box size and icon modifier (defaults unchanged for the existing compact relay lists) and render the gallery relays at 35dp with MediumRelayIconModifier to match. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01GVPYTTnMbxwi5hUAagsKVc --- .../amethyst/ui/note/AcceptedByRelaysGallery.kt | 11 ++++++++++- .../vitorpamplona/amethyst/ui/note/RelayListRow.kt | 8 ++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/AcceptedByRelaysGallery.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/AcceptedByRelaysGallery.kt index b0e29acd7b..5ca0da3763 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/AcceptedByRelaysGallery.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/AcceptedByRelaysGallery.kt @@ -41,7 +41,9 @@ import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.stringRes +import com.vitorpamplona.amethyst.ui.theme.MediumRelayIconModifier import com.vitorpamplona.amethyst.ui.theme.Size20dp +import com.vitorpamplona.amethyst.ui.theme.Size35dp import com.vitorpamplona.amethyst.ui.theme.StdStartPadding import com.vitorpamplona.amethyst.ui.theme.WidthAuthorPictureModifier import com.vitorpamplona.amethyst.ui.theme.placeholderText @@ -116,7 +118,14 @@ private fun RelayGallery( Column(modifier = StdStartPadding) { FlowRow { relays.forEach { relay -> - RenderRelay(relay, accountViewModel, nav) + // Match the 35dp author pictures of the sibling zap/boost/reaction lines. + RenderRelay( + relay = relay, + accountViewModel = accountViewModel, + nav = nav, + boxSize = Size35dp, + iconModifier = MediumRelayIconModifier, + ) } } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/RelayListRow.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/RelayListRow.kt index 1d16720674..1ff89c1a5b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/RelayListRow.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/RelayListRow.kt @@ -43,6 +43,7 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalClipboard import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.lifecycle.compose.collectAsStateWithLifecycle @@ -128,15 +129,17 @@ fun RenderRelay( relay: NormalizedRelayUrl, accountViewModel: AccountViewModel, nav: INav, + boxSize: Dp = Size17dp, + iconModifier: Modifier = MaterialTheme.colorScheme.relayIconModifier, ) { val relayInfo by loadRelayInfo(relay) val clipboardManager = LocalClipboard.current val scope = rememberCoroutineScope() val clickableModifier = - remember(relay) { + remember(relay, boxSize) { Modifier - .size(Size17dp) + .size(boxSize) .combinedClickable( indication = ripple24dp, interactionSource = MutableInteractionSource(), @@ -159,6 +162,7 @@ fun RenderRelay( loadProfilePicture = accountViewModel.settings.showProfilePictures(), pingInMs = 0, loadRobohash = accountViewModel.settings.isNotPerformanceMode(), + iconModifier = iconModifier, ) } }