From a105eb91d7af603e0e6f9ffca54df01a3445997d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 27 May 2026 02:43:25 +0000 Subject: [PATCH] =?UTF-8?q?ui(zap):=20reorder=20amount-choice=20chips=20?= =?UTF-8?q?=E2=80=94=20Cashu,=20Lightning,=20on-chain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the popup rendered Lightning chips first, then on-chain, then Cashu. With recipient-capability gating in place, lead with the rail that's both fastest and free-of-fees when available — Cashu (nutzap) — falling back to Lightning, then on-chain. Mirrors the priority order RailCapabilityResolver uses for the underlying capability fallback, so the visual top-down sweep matches "best rail for this recipient that the sender has configured". Mechanical reorder inside ZapAmountChoicePopupContent's FlowRow — no behaviour change beyond layout. Gear settings button stays at the end. https://claude.ai/code/session_01MdWddiar819f8XYt5N8BjP --- .../amethyst/ui/note/ReactionsRow.kt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt index 2b8be8230e..d077abc8db 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt @@ -2035,6 +2035,17 @@ fun ZapAmountChoicePopupContent( verticalArrangement = Arrangement.Center, itemVerticalAlignment = CenterVertically, ) { + // Order: Cashu first (instant, no fees), then Lightning, + // then on-chain — matches the recipient-capability fallback + // order used elsewhere (RailCapabilityResolver) so the + // "happiest path" rail surfaces first for the eye. + nutzapAmountChoices.forEach { amountInSats -> + NutzapAmountChip( + amountInSats = amountInSats, + onClick = { onNutzap(amountInSats) }, + onLongClick = onChangeAmount, + ) + } zapAmountChoices.forEach { amountInSats -> ZapAmountChip( amountInSats = amountInSats, @@ -2049,13 +2060,6 @@ fun ZapAmountChoicePopupContent( onLongClick = onChangeAmount, ) } - nutzapAmountChoices.forEach { amountInSats -> - NutzapAmountChip( - amountInSats = amountInSats, - onClick = { onNutzap(amountInSats) }, - onLongClick = onChangeAmount, - ) - } ClickableBox( modifier = Modifier