Fix profile view toolbar alignment bug in iOS 18

Changelog-Fixed: Fix profile view toolbar alignment bug in iOS 18
This commit is contained in:
2024-07-28 22:48:05 -04:00
parent dba1799df0
commit 1767a677bb

View File

@@ -217,16 +217,6 @@ struct ProfileView: View {
} }
} }
var customNavbar: some View {
HStack {
navBackButton
Spacer()
navActionSheetButton
}
.padding(.top, 5)
.accentColor(DamusColors.white)
}
func lnButton(unownedProfile: Profile?, record: ProfileRecord?) -> some View { func lnButton(unownedProfile: Profile?, record: ProfileRecord?) -> some View {
return ProfileZapLinkView(unownedProfileRecord: record, profileModel: self.profile) { reactions_enabled, lud16, lnurl in return ProfileZapLinkView(unownedProfileRecord: record, profileModel: self.profile) { reactions_enabled, lud16, lnurl in
Image(reactions_enabled ? "zap.fill" : "zap") Image(reactions_enabled ? "zap.fill" : "zap")
@@ -458,8 +448,15 @@ struct ProfileView: View {
.navigationTitle("") .navigationTitle("")
.navigationBarBackButtonHidden() .navigationBarBackButtonHidden()
.toolbar { .toolbar {
ToolbarItem(placement: .principal) { ToolbarItem(placement: .topBarLeading) {
customNavbar navBackButton
.padding(.top, 5)
.accentColor(DamusColors.white)
}
ToolbarItem(placement: .topBarTrailing) {
navActionSheetButton
.padding(.top, 5)
.accentColor(DamusColors.white)
} }
} }
.toolbarBackground(.hidden) .toolbarBackground(.hidden)