From 92da66059bdaf53eabb64d11d220bfe1a1e676f1 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 8 Mar 2026 12:31:03 -0400 Subject: [PATCH] Opens the amount dialog when pressing the zap button without any zap setup --- .../com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 30ec920a3..f6e92f3c4 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 @@ -1117,6 +1117,9 @@ fun ZapReaction( nav.nav(Route.ManualZapSplitPayment(uid)) } }, + onCustomAmount = { + wantsToSetCustomZap = true + }, ) } }, @@ -1248,6 +1251,7 @@ fun zapClick( onZapStarts: () -> Unit, onZappingProgress: (Float) -> Unit, onMultipleChoices: () -> Unit, + onCustomAmount: () -> Unit, onError: (String, String, User?) -> Unit, onPayViaIntent: (ImmutableList) -> Unit, ) { @@ -1262,10 +1266,7 @@ fun zapClick( val choices = accountViewModel.zapAmountChoices() if (choices.isEmpty()) { - accountViewModel.toastManager.toast( - R.string.error_dialog_zap_error, - R.string.no_zap_amount_setup_long_press_to_change, - ) + onCustomAmount() } else if (!accountViewModel.isWriteable()) { accountViewModel.toastManager.toast( R.string.error_dialog_zap_error,