aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-19 22:36:55 -0700
committerAdam Soltys <[email protected]>2026-09-19 22:36:55 -0700
commitb9f8ec30e6681c623162bb36e44df16934740b32 (patch)
tree4deeaa3f460f4e1af37b8968eed4fcff924bd4dc /src/app.js
parent1b142c92ce869a6ebe97825931ef3553255ba58e (diff)
downloadcoinosv3-b9f8ec30e6681c623162bb36e44df16934740b32.tar.gz
coinosv3-b9f8ec30e6681c623162bb36e44df16934740b32.zip
Zaps: the sound can be switched off — from the held bolt or Settings → Nostr.
A prefs flag (zapSound, absent = on) synced with the zap amount. The strike and the tally are unchanged; only the clip stays quiet, and the clip chunk is not even fetched while it's off. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
index 16f0595..6a8b6a6 100644
--- a/src/app.js
+++ b/src/app.js
@@ -5376,6 +5376,14 @@ const ctx = {
wallet.saveFeatureState('prefs', p);
try { wallet.saveCache(); } catch {}
},
+ // the tap's sound effect — on unless switched off from the held-⚡ screen
+ zapSound: () => !wallet.loadFeatureState || wallet.loadFeatureState('prefs', {}).zapSound !== false,
+ setZapSound: (on) => {
+ const p = wallet.loadFeatureState('prefs', {});
+ if (on) delete p.zapSound; else p.zapSound = false;
+ wallet.saveFeatureState('prefs', p);
+ try { wallet.saveCache(); } catch {}
+ },
// Per-recipient auto-pay budget: a fixed-amount LNURL/address the user
// trusts to pay without confirmation, up to this many sats. Keyed by the
// recipient's address/lnurl. Synced with the rest of prefs.