damus

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

commit 65c132593555a9bf811d2240a23879bf88355214
parent db64a73f87b26ae76fb955714d49663642295ccc
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 12 Jan 2023 11:48:06 -0800

Add some eventbar previews

Diffstat:
Mdamus/Views/ActionBar/EventActionBar.swift | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift @@ -174,8 +174,19 @@ struct EventActionBar_Previews: PreviewProvider { static var previews: some View { let pk = "pubkey" let ds = test_damus_state() - let bar = ActionBarModel(likes: 0, boosts: 0, tips: 0, our_like: nil, our_boost: nil, our_tip: nil) let ev = NostrEvent(content: "hi", pubkey: pk) - EventActionBar(damus_state: ds, event: ev, bar: bar) + + let bar = ActionBarModel(likes: 0, boosts: 0, tips: 0, our_like: nil, our_boost: nil, our_tip: nil) + let likedbar = ActionBarModel(likes: 10, boosts: 0, tips: 0, our_like: nil, our_boost: nil, our_tip: nil) + let likedbar_ours = ActionBarModel(likes: 10, boosts: 0, tips: 0, our_like: NostrEvent(id: "", content: "", pubkey: ""), our_boost: nil, our_tip: nil) + + VStack(spacing: 50) { + EventActionBar(damus_state: ds, event: ev, bar: bar) + + EventActionBar(damus_state: ds, event: ev, bar: likedbar) + + EventActionBar(damus_state: ds, event: ev, bar: likedbar_ours) + } + .padding(20) } }