From fa484c00eb69245c46dba878f9f41f565cfcd9af Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 27 May 2026 19:44:37 +0000 Subject: [PATCH] ui(wallet): lead the wallet row with the drag handle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DragIndicator sat between the wallet name column and the balance column with verticalAlignment=CenterVertically, so it visually centered between the balance amount and the "sats" subtitle — landing in dead space between two lines. Move it to the start of the row, matching the relay-reorder convention (BasicRelaySetupInfoClickableRow). Same icon, same modifier, same RelayDragState wiring; just promoted from middle to leading slot. --- .../ui/screen/loggedIn/wallet/WalletScreen.kt | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt index 8236a93f37..a3b37494d8 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/WalletScreen.kt @@ -363,6 +363,22 @@ private fun WalletCard( horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically, ) { + // Drag handle leads the row — same convention as the + // relay reorder list — so a center-aligned icon doesn't + // land between the balance amount and its "sats" label. + if (dragState != null) { + Icon( + MaterialSymbols.DragIndicator, + contentDescription = stringRes(R.string.wallet_reorder), + modifier = + Modifier + .size(24.dp) + .relayDragHandle(index, dragState), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Spacer(modifier = Modifier.width(8.dp)) + } + Column(modifier = Modifier.weight(1f)) { Row(verticalAlignment = Alignment.CenterVertically) { Text( @@ -389,20 +405,6 @@ private fun WalletCard( } } - // Drag handle for reordering - if (dragState != null) { - Icon( - MaterialSymbols.DragIndicator, - contentDescription = stringRes(R.string.wallet_reorder), - modifier = - Modifier - .size(24.dp) - .relayDragHandle(index, dragState), - tint = MaterialTheme.colorScheme.onSurfaceVariant, - ) - Spacer(modifier = Modifier.width(8.dp)) - } - // Balance if (walletInfo.isLoading && walletInfo.balanceSats == null) { CircularProgressIndicator(modifier = Modifier.size(24.dp))