From 1b142c92ce869a6ebe97825931ef3553255ba58e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 19 Sep 2026 22:28:36 -0700 Subject: Zaps: tap again while one flies, hold the bolt to change the amount. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pending zap no longer refuses the next tap: the optimistic tally keeps one entry per zap and matches each report and receipt to the oldest it can describe, so two default-amount zaps stack, settle and hand over to their receipts one at a time. Instant post zaps run off the send screen's zap slot, so a second tap can't evict the one still resolving, and send action ids are unique within a millisecond. Holding ⚡ (500ms) opens the amount screen in an edit mode — Save alone, or Save and zap this note — from the action bar and the chat chips alike; the press's timer lives on the element so a background repaint mid-press can't turn a lifted finger into a hold. Co-Authored-By: Claude Fable 5.1 --- src/ark/manager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ark') diff --git a/src/ark/manager.js b/src/ark/manager.js index c3a8b58..1381095 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -833,8 +833,12 @@ export class ArkManager { changeIndex: changeSat > 0 ? this.state.nextKeyIndex++ : null, }; }); + // Two zaps tapped in quick succession can resolve in the same + // millisecond; each needs its own row. + let id = `send-${Date.now()}`; + while (this.state.actions.some((a) => a.id === id)) id += '-'; const action = { - id: `send-${Date.now()}`, type: 'send', step: 'created', + id, type: 'send', step: 'created', parts, amountSat, destAddress: addrString, destPubkey: dest.userPubkey, destBlindedId: mailboxDelivery.data, }; -- cgit v1.2.3