damus

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

commit 5ab1d6294c2c5c40298516a73d0d2b097b2aa751
parent 2f90f2d4b75b97ff5fcdbc85a5b44fe90850be34
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 27 Feb 2023 11:08:03 -0800

Fix default zap amount setting not getting updated

Changelog-Fixed: Fix default zap amount setting not getting updated

Diffstat:
Mdamus/Views/ConfigView.swift | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift @@ -136,6 +136,7 @@ struct ConfigView: View { if let parsed = handle_string_amount(new_value: newValue) { self.default_zap_amount = String(parsed) + set_default_zap_amount(pubkey: self.state.pubkey, amount: parsed) } } } @@ -337,7 +338,8 @@ struct ConfigView_Previews: PreviewProvider { func handle_string_amount(new_value: String) -> Int? { - let filtered = new_value.filter { Set("0123456789").contains($0) } + let digits = Set("0123456789") + let filtered = new_value.filter { digits.contains($0) } if filtered == "" { return nil