UserView: Make spacer optional

We need this to center this view sometimes. We should look into removing
this in the future?
This commit is contained in:
William Casarin
2023-06-22 09:42:47 +02:00
parent 455f1f7e1f
commit 892765eaa5

View File

@@ -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()
}
}
}
}