From 26944a156dcdeb9f4b7de5b32eeafddbec1582d9 Mon Sep 17 00:00:00 2001 From: Diogo Date: Tue, 27 Aug 2024 11:06:44 +0100 Subject: [PATCH] edit current profile from picker --- apps/ios/Shared/Views/ChatList/UserPicker.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/ios/Shared/Views/ChatList/UserPicker.swift b/apps/ios/Shared/Views/ChatList/UserPicker.swift index 8d85466b15..a38d61e65d 100644 --- a/apps/ios/Shared/Views/ChatList/UserPicker.swift +++ b/apps/ios/Shared/Views/ChatList/UserPicker.swift @@ -11,6 +11,7 @@ enum UserPickerSheet: Identifiable { case chatPreferences case migrateDevice case chatProfiles + case currentProfile var id: Self { self } } @@ -40,6 +41,10 @@ struct UserPicker: View { if let currentUser = m.currentUser { HStack(spacing: 19) { ProfileImage(imageStr: currentUser.image, size: 44) + .onTapGesture { + showSettings = false + activeSheet = .currentProfile + } Spacer() ForEach(users) { u in userView(u) @@ -138,6 +143,12 @@ struct UserPicker: View { switch sheet { case .chatProfiles: UserProfilesView(showSettings: $showSettings) + case .currentProfile: + if m.currentUser != nil { + UserProfile() + .navigationTitle("Your current profile") + .modifier(ThemedBackground()) + } case .address: if let user = m.currentUser { UserAddressView(shareViaProfile: user.addressShared)