diff --git a/damus/Models/DamusState.swift b/damus/Models/DamusState.swift index c3455393..4f3bb724 100644 --- a/damus/Models/DamusState.swift +++ b/damus/Models/DamusState.swift @@ -22,6 +22,11 @@ struct DamusState { var pubkey: String { return keypair.pubkey } + + var is_privkey_user: Bool { + keypair.privkey != nil + } + static var empty: DamusState { return DamusState.init(pool: RelayPool(), keypair: Keypair(pubkey: "", privkey: ""), likes: EventCounter(our_pubkey: ""), boosts: EventCounter(our_pubkey: ""), contacts: Contacts(our_pubkey: ""), tips: TipCounter(our_pubkey: ""), profiles: Profiles(), dms: DirectMessagesModel(), previews: PreviewCache()) diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift index 8a913909..541a1767 100644 --- a/damus/Views/ActionBar/EventActionBar.swift +++ b/damus/Views/ActionBar/EventActionBar.swift @@ -41,7 +41,7 @@ struct EventActionBar: View { EventActionButton(img: "arrow.2.squarepath", col: bar.boosted ? Color.green : nil) { if bar.boosted { notify(.delete, bar.our_boost) - } else { + } else if damus_state.is_privkey_user { self.confirm_boost = true } }.overlay {