From d174e054e0fd5e088dc536dc2cbfe443dee12ff8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 28 May 2026 22:53:10 +0000 Subject: [PATCH] fix(nutzap): smaller gallery icon + drop redundant success toast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two UI follow-ups after seeing the rails in the running app: 1. ReactionDetailGallery cashu row was Size25dp, matching the lightning-bolt convention from OnchainZapGallery. The multi-tone cashu glyph reads bigger than a thin bolt at the same nominal dp, so the row felt visually heavier than the lightning row above it. Drop to Size20dp to match the cashu chip in MultiSetCompose.RenderNutzapGallery and the boost / like rows that sit below. 2. sendNutzap's success toast is now redundant. The earlier Phase 1 work attaches the kind:9321 to the target Note via addNutzap, so the reaction-row counter and the you-already-zapped icon highlight both update on their own the moment the kind:9321 round-trips through the cache. A "Cashu zap sent" toast on top of that visible state change is just noise. Drop the toast and the now-unused nutzap_sent_title / nutzap_sent_amount strings. The Phase 0 work was an artifact of the order I implemented the phases — feedback first while the counter was still LN-only, then the foundation made the toast moot. Removing it now keeps the final UX clean. --- .../amethyst/ui/note/NutzapGallery.kt | 4 ++-- .../ui/screen/loggedIn/AccountViewModel.kt | 18 +++++------------- amethyst/src/main/res/values/strings.xml | 5 ----- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NutzapGallery.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NutzapGallery.kt index 08bfa64b75..807e61b160 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NutzapGallery.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NutzapGallery.kt @@ -45,7 +45,7 @@ import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.routeFor import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.stringRes -import com.vitorpamplona.amethyst.ui.theme.Size25dp +import com.vitorpamplona.amethyst.ui.theme.Size20dp import com.vitorpamplona.amethyst.ui.theme.Size35Modifier import com.vitorpamplona.amethyst.ui.theme.StdStartPadding import com.vitorpamplona.amethyst.ui.theme.WidthAuthorPictureModifier @@ -98,7 +98,7 @@ private fun RenderNutzapGalleryRow( Icon( imageVector = CustomHashTagIcons.Cashu, contentDescription = stringRes(R.string.nutzap), - modifier = Modifier.size(Size25dp).align(Alignment.TopEnd), + modifier = Modifier.size(Size20dp).align(Alignment.TopEnd), tint = Color.Unspecified, ) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt index 674424b645..35014b1745 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt @@ -943,19 +943,11 @@ class AccountViewModel( zappedEvent = zappedEvent, message = message, ) - // Success surface — without it, the popup closes the - // instant the user taps the chip and there's no visible - // change for ~1-2 seconds while the swap and publish - // round-trip. Users perceive that gap as "nothing - // happened" and re-tap (which then gets the success - // toast for the second swap…). A direct toast scoped to - // the wallet path (not lightning's `onProgress` bar, - // which doesn't fit a 1-tick async op) closes the loop. - val appContext = com.vitorpamplona.amethyst.Amethyst.instance.appContext - toastManager.toast( - stringRes(appContext, R.string.nutzap_sent_title), - appContext.resources.getQuantityString(R.plurals.nutzap_sent_amount, amountSats.toInt(), amountSats.toInt()), - ) + // No success toast — the kind:9321 round-trips through the + // cache, attaches to the target Note via addNutzap, and the + // reaction row's zap counter + the icon-highlight state both + // light up automatically. A toast on top would be redundant + // noise. } catch (e: Exception) { onError( stringRes(com.vitorpamplona.amethyst.Amethyst.instance.appContext, R.string.nutzap_failed_title), diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index e1e78d7cf5..a735fa370b 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -2004,11 +2004,6 @@ Nutzap failed No recipient pubkey on the note Cannot build event reference - Cashu zap sent - - Sent %1$d sat via cashu - Sent %1$d sats via cashu - Create token Redeem Done