Opens the amount dialog when pressing the zap button without any zap setup
This commit is contained in:
@@ -1117,6 +1117,9 @@ fun ZapReaction(
|
|||||||
nav.nav(Route.ManualZapSplitPayment(uid))
|
nav.nav(Route.ManualZapSplitPayment(uid))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onCustomAmount = {
|
||||||
|
wantsToSetCustomZap = true
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1248,6 +1251,7 @@ fun zapClick(
|
|||||||
onZapStarts: () -> Unit,
|
onZapStarts: () -> Unit,
|
||||||
onZappingProgress: (Float) -> Unit,
|
onZappingProgress: (Float) -> Unit,
|
||||||
onMultipleChoices: () -> Unit,
|
onMultipleChoices: () -> Unit,
|
||||||
|
onCustomAmount: () -> Unit,
|
||||||
onError: (String, String, User?) -> Unit,
|
onError: (String, String, User?) -> Unit,
|
||||||
onPayViaIntent: (ImmutableList<ZapPaymentHandler.Payable>) -> Unit,
|
onPayViaIntent: (ImmutableList<ZapPaymentHandler.Payable>) -> Unit,
|
||||||
) {
|
) {
|
||||||
@@ -1262,10 +1266,7 @@ fun zapClick(
|
|||||||
val choices = accountViewModel.zapAmountChoices()
|
val choices = accountViewModel.zapAmountChoices()
|
||||||
|
|
||||||
if (choices.isEmpty()) {
|
if (choices.isEmpty()) {
|
||||||
accountViewModel.toastManager.toast(
|
onCustomAmount()
|
||||||
R.string.error_dialog_zap_error,
|
|
||||||
R.string.no_zap_amount_setup_long_press_to_change,
|
|
||||||
)
|
|
||||||
} else if (!accountViewModel.isWriteable()) {
|
} else if (!accountViewModel.isWriteable()) {
|
||||||
accountViewModel.toastManager.toast(
|
accountViewModel.toastManager.toast(
|
||||||
R.string.error_dialog_zap_error,
|
R.string.error_dialog_zap_error,
|
||||||
|
|||||||
Reference in New Issue
Block a user