damus

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

commit f0b8dcc5e95131767ef56c041288dc95a753b9ea
parent 72b60573de81aef65fc5730af3b93a1da5f73147
Author: Daniel D‘Aquino <daniel@daquino.me>
Date:   Thu,  3 Aug 2023 03:38:41 +0000

Split view previews in NoteContentView to make both variants visible

Signed-off-by: Daniel D‘Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Views/NoteContentView.swift | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/damus/Views/NoteContentView.swift b/damus/Views/NoteContentView.swift @@ -599,12 +599,19 @@ func trim_prefix(_ str: String) -> String { struct NoteContentView_Previews: PreviewProvider { static var previews: some View { let state = test_damus_state() + let state2 = test_damus_state() - VStack { - NoteContentView(damus_state: state, event: test_note, show_images: true, size: .normal, options: []) + Group { + VStack { + NoteContentView(damus_state: state, event: test_note, show_images: true, size: .normal, options: []) + } + .previewDisplayName("Short note") - NoteContentView(damus_state: state, event: test_longform_event.event, show_images: true, size: .normal, options: [.wide]) - .border(Color.red) + VStack { + NoteContentView(damus_state: state2, event: test_longform_event.event, show_images: true, size: .normal, options: [.wide]) + .border(Color.red) + } + .previewDisplayName("Long-form note") } } }