mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Edit carddav friend
This commit is contained in:
parent
41f9db8199
commit
ac6b478eb1
3 changed files with 7 additions and 2 deletions
|
|
@ -211,7 +211,7 @@ struct ContactInnerActionsFragment: View {
|
|||
.background(Color.gray100)
|
||||
|
||||
VStack(spacing: 0) {
|
||||
if !contactAvatarModel.nativeUri.isEmpty {
|
||||
if !contactAvatarModel.editable {
|
||||
Button {
|
||||
actionEditButton()
|
||||
} label: {
|
||||
|
|
|
|||
|
|
@ -72,8 +72,9 @@ struct ContactInnerFragment: View {
|
|||
|
||||
Spacer()
|
||||
|
||||
if !contactAvatarModel.nativeUri.isEmpty {
|
||||
if !contactAvatarModel.editable {
|
||||
Button(action: {
|
||||
print("nativeUrinativeUri 00 \(contactAvatarModel.nativeUri)")
|
||||
editNativeContact()
|
||||
}, label: {
|
||||
Image("pencil-simple")
|
||||
|
|
@ -99,6 +100,7 @@ struct ContactInnerFragment: View {
|
|||
}
|
||||
.simultaneousGesture(
|
||||
TapGesture().onEnded {
|
||||
print("nativeUrinativeUri 11 \(contactAvatarModel.nativeUri)")
|
||||
isShowEditContactFragmentInContactDetails = true
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class ContactAvatarModel: ObservableObject, Identifiable {
|
|||
@Published var phoneNumbersWithLabel: [(label: String, phoneNumber: String)] = []
|
||||
|
||||
var nativeUri: String = ""
|
||||
var editable: Bool = true
|
||||
var withPresence: Bool?
|
||||
|
||||
@Published var starred: Bool = false
|
||||
|
|
@ -70,6 +71,7 @@ class ContactAvatarModel: ObservableObject, Identifiable {
|
|||
}
|
||||
}
|
||||
let nativeUriTmp = friend?.nativeUri ?? ""
|
||||
let editableTmp = friend?.friendList?.type == .CardDAV || nativeUriTmp.isEmpty
|
||||
let withPresenceTmp = withPresence
|
||||
let starredTmp = friend?.starred ?? false
|
||||
let vcardTmp = friend?.vcard ?? nil
|
||||
|
|
@ -108,6 +110,7 @@ class ContactAvatarModel: ObservableObject, Identifiable {
|
|||
self.addresses = addressesTmp
|
||||
self.phoneNumbersWithLabel = phoneNumbersWithLabelTmp
|
||||
self.nativeUri = nativeUriTmp
|
||||
self.editable = editableTmp
|
||||
self.withPresence = withPresenceTmp
|
||||
self.starred = starredTmp
|
||||
self.vcard = vcardTmp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue