mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 08:47:33 +00:00
fix(nutzap): smaller gallery icon + drop redundant success toast
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.
This commit is contained in:
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
+5
-13
@@ -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),
|
||||
|
||||
@@ -2004,11 +2004,6 @@
|
||||
<string name="nutzap_failed_title">Nutzap failed</string>
|
||||
<string name="nutzap_failed_no_recipient">No recipient pubkey on the note</string>
|
||||
<string name="nutzap_failed_no_event">Cannot build event reference</string>
|
||||
<string name="nutzap_sent_title">Cashu zap sent</string>
|
||||
<plurals name="nutzap_sent_amount">
|
||||
<item quantity="one">Sent %1$d sat via cashu</item>
|
||||
<item quantity="other">Sent %1$d sats via cashu</item>
|
||||
</plurals>
|
||||
<string name="cashu_create_token">Create token</string>
|
||||
<string name="cashu_redeem_button">Redeem</string>
|
||||
<string name="cashu_done">Done</string>
|
||||
|
||||
Reference in New Issue
Block a user