damus

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

commit 892765eaa5d513721623d7d144ca7ae153014b95
parent 455f1f7e1f4e1ce9a05df542f88444e5ef934645
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 22 Jun 2023 09:42:47 +0200

UserView: Make spacer optional

We need this to center this view sometimes. We should look into removing
this in the future?

Diffstat:
Mdamus/Components/UserView.swift | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/damus/Components/UserView.swift b/damus/Components/UserView.swift @@ -32,9 +32,16 @@ struct UserViewRow: View { struct UserView: View { let damus_state: DamusState let pubkey: String + let spacer: Bool @State var about_text: Text? = nil + init(damus_state: DamusState, pubkey: String, spacer: Bool = true) { + self.damus_state = damus_state + self.pubkey = pubkey + self.spacer = spacer + } + var body: some View { VStack { HStack { @@ -50,7 +57,9 @@ struct UserView: View { } } - Spacer() + if spacer { + Spacer() + } } } }