Add post button when logged in with private key and on own profile view

Changelog-Added: Add post button when logged in with private key and on own profile view
This commit is contained in:
2023-06-25 20:57:51 -04:00
parent 422167f7aa
commit 8678ca7144

View File

@@ -466,6 +466,7 @@ struct ProfileView: View {
} }
var body: some View { var body: some View {
ZStack {
ScrollView(.vertical) { ScrollView(.vertical) {
VStack(spacing: 0) { VStack(spacing: 0) {
bannerSection bannerSection
@@ -521,6 +522,13 @@ struct ProfileView: View {
.fullScreenCover(isPresented: $show_qr_code) { .fullScreenCover(isPresented: $show_qr_code) {
QRCodeView(damus_state: damus_state, pubkey: profile.pubkey) QRCodeView(damus_state: damus_state, pubkey: profile.pubkey)
} }
if profile.pubkey == damus_state.pubkey && damus_state.is_privkey_user {
PostButtonContainer(is_left_handed: damus_state.settings.left_handed) {
notify(.compose, PostAction.posting)
}
}
}
} }
} }