mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-24 13:05:41 +00:00
edit current profile from picker
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user