damus

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

commit 57006b928bf48c205d91cd4eb7419979b4d1c1a3
parent 98f0b2f2d2123a96b1c027311847fcd5bebfe726
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 25 Mar 2023 06:31:18 -0600

Revert "Don't make previews full bleed"

This reverts commit 98f0b2f2d2123a96b1c027311847fcd5bebfe726.

Diffstat:
Mdamus/Views/NoteContentView.swift | 48++++++++++++++----------------------------------
1 file changed, 14 insertions(+), 34 deletions(-)

diff --git a/damus/Views/NoteContentView.swift b/damus/Views/NoteContentView.swift @@ -58,28 +58,8 @@ struct NoteContentView: View { .font(eventviewsize_to_font(size)) } - var invoicesView: some View { - InvoicesView(our_pubkey: damus_state.keypair.pubkey, invoices: artifacts.invoices) - } - - var previewView: some View { - Group { - if let preview = self.preview, show_images { - if let preview_height { - preview - .frame(height: preview_height) - } else { - preview - } - } else if let link = artifacts.links.first { - LinkViewRepresentable(meta: .url(link)) - .frame(height: 50) - } - } - } - - var MainContent: some View { - VStack(alignment: .leading) { + func MainContent() -> some View { + return VStack(alignment: .leading) { if size == .selected { SelectableText(attributedString: artifacts.content) TranslateView(damus_state: damus_state, event: event) @@ -104,25 +84,25 @@ struct NoteContentView: View { } if artifacts.invoices.count > 0 { - if with_padding { - invoicesView - .padding(.horizontal) - } else { - invoicesView - } + InvoicesView(our_pubkey: damus_state.keypair.pubkey, invoices: artifacts.invoices) } - if with_padding { - previewView.padding(.horizontal) - } else { - previewView + if let preview = self.preview, show_images { + if let preview_height { + preview + .frame(height: preview_height) + } else { + preview + } + } else if let link = artifacts.links.first { + LinkViewRepresentable(meta: .url(link)) + .frame(height: 50) } - } } var body: some View { - MainContent + MainContent() .onReceive(handle_notify(.profile_updated)) { notif in let profile = notif.object as! ProfileUpdate let blocks = event.blocks(damus_state.keypair.privkey)