From f0b5162205f5b25479e5fb7206c617b3e153595a Mon Sep 17 00:00:00 2001 From: Terry Yiu Date: Sun, 28 Jul 2024 22:48:05 -0400 Subject: [PATCH] Fix profile view toolbar alignment bug in iOS 18 Changelog-Fixed: Fix profile view toolbar alignment bug in iOS 18 --- damus/Views/Profile/ProfileView.swift | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/damus/Views/Profile/ProfileView.swift b/damus/Views/Profile/ProfileView.swift index 235720e0..a17df5f0 100644 --- a/damus/Views/Profile/ProfileView.swift +++ b/damus/Views/Profile/ProfileView.swift @@ -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 { return ProfileZapLinkView(unownedProfileRecord: record, profileModel: self.profile) { reactions_enabled, lud16, lnurl in Image(reactions_enabled ? "zap.fill" : "zap") @@ -458,8 +448,15 @@ struct ProfileView: View { .navigationTitle("") .navigationBarBackButtonHidden() .toolbar { - ToolbarItem(placement: .principal) { - customNavbar + ToolbarItem(placement: .topBarLeading) { + navBackButton + .padding(.top, 5) + .accentColor(DamusColors.white) + } + ToolbarItem(placement: .topBarTrailing) { + navActionSheetButton + .padding(.top, 5) + .accentColor(DamusColors.white) } } .toolbarBackground(.hidden)