commit d34d417fcc3a82693fb41ee09a36e3b346d0971f
parent b665a40a11ced8e249a9647cebf4aa3874ae7332
Author: William Casarin <jb55@jb55.com>
Date: Wed, 23 Aug 2023 09:27:09 -0700
home: collapse guard statement
small nit refactor
Diffstat:
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift
@@ -223,13 +223,9 @@ class HomeModel {
func handle_zap_event(_ ev: NostrEvent) {
process_zap_event(damus_state: damus_state, ev: ev) { zapres in
- guard case .done(let zap) = zapres else { return }
-
- guard zap.target.pubkey == self.damus_state.keypair.pubkey else {
- return
- }
-
- guard should_show_event(privkey: self.damus_state.keypair.privkey, hellthreads: self.damus_state.muted_threads, contacts: self.damus_state.contacts, ev: zap.request.ev) else {
+ guard case .done(let zap) = zapres,
+ zap.target.pubkey == self.damus_state.keypair.pubkey,
+ should_show_event(privkey: self.damus_state.keypair.privkey, hellthreads: self.damus_state.muted_threads, contacts: self.damus_state.contacts, ev: zap.request.ev) else {
return
}