From d34d417fcc3a82693fb41ee09a36e3b346d0971f Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 23 Aug 2023 09:27:09 -0700 Subject: [PATCH] home: collapse guard statement small nit refactor --- damus/Models/HomeModel.swift | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift index 41bd95ce..b6d33919 100644 --- 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 }