damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 0ce7414488e830f230b68e270bbd402c5d80f25b
parent f09059606709f7ca5a3a2bb63c4b22ed30fb1ee5
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 23 Jun 2023 12:42:09 +0200

nozaps: disable donation zaps on appstore

Diffstat:
Mdamus/Components/ZapButton.swift | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/damus/Components/ZapButton.swift b/damus/Components/ZapButton.swift @@ -241,11 +241,12 @@ func send_zap(damus_state: DamusState, target: ZapTarget, lnurl: String, is_cust } var flusher: OnFlush? = nil - // Don't donate on custom zaps - if !is_custom && damus_state.settings.donation_percent > 0 { + + // donations are only enabled on one-tap zaps and off appstore + if !damus_state.settings.nozaps && !is_custom && damus_state.settings.donation_percent > 0 { flusher = .once({ pe in // send donation zap when the pending zap is flushed, this allows user to cancel and not send a donation - Task.init { @MainActor in + Task { @MainActor in await send_donation_zap(pool: damus_state.pool, postbox: damus_state.postbox, nwc: nwc_state.url, percent: damus_state.settings.donation_percent, base_msats: amount_msat) } })