commit 67869394cb8d76e3a6ede68aed5ed1bdbc630a36 parent 22876b5c28d6c627408da4a0062debfcbb6365c8 Author: William Casarin <jb55@jb55.com> Date: Tue, 25 Apr 2023 12:41:37 -0700 Fix permanent OnlyZaps (likes broken lol) Diffstat:
M | damus/Views/ActionBar/EventActionBar.swift | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift @@ -18,7 +18,14 @@ struct EventActionBar: View { @State var show_share_sheet: Bool = false @State var show_share_action: Bool = false @State var show_repost_action: Bool = false - @State var bar: ActionBarModel = ActionBarModel() + + @ObservedObject var bar: ActionBarModel + + init(damus_state: DamusState, event: NostrEvent, bar: ActionBarModel? = nil) { + self.damus_state = damus_state + self.event = event + _bar = ObservedObject(wrappedValue: bar ?? make_actionbar_model(ev: event.id, damus: damus_state)) + } @Environment(\.colorScheme) var colorScheme