mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
fix ldap property for friend (fix #LINQT-1974)
This commit is contained in:
parent
5da7a9fd6b
commit
2560691c84
4 changed files with 66 additions and 60 deletions
|
|
@ -91,7 +91,8 @@ FriendCore::FriendCore(const std::shared_ptr<linphone::Friend> &contact, bool is
|
|||
mStarred = contact->getStarred();
|
||||
mIsSaved = true;
|
||||
mIsStored = isStored;
|
||||
mIsLdap = ToolModel::friendIsInFriendList(ToolModel::getLdapFriendList(), contact);
|
||||
mIsLdap = ToolModel::friendIsInFriendList(ToolModel::getLdapFriendList(), contact) ||
|
||||
(sourceFlags & (int)linphone::MagicSearch::Source::LdapServers) != 0;
|
||||
mIsCardDAV = (sourceFlags & (int)linphone::MagicSearch::Source::RemoteCardDAV) != 0;
|
||||
mIsAppFriend = ToolModel::friendIsInFriendList(ToolModel::getAppFriendList(), contact);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ FocusScope {
|
|||
popup.contentItem: ColumnLayout {
|
||||
IconLabelButton {
|
||||
Layout.fillWidth: true
|
||||
visible: searchResultItem.core.isStored
|
||||
visible: searchResultItem && searchResultItem.core.isStored
|
||||
&& !searchResultItem.core.readOnly
|
||||
//: "Enlever des favoris"
|
||||
text: searchResultItem.core.starred ? qsTr("contact_details_remove_from_favourites")
|
||||
|
|
@ -243,11 +243,10 @@ FocusScope {
|
|||
text: qsTr("contact_details_delete")
|
||||
icon.source: AppIcons.trashCan
|
||||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
visible: !searchResultItem.core.readOnly
|
||||
visible: searchResultItem && searchResultItem.core.isStored && !searchResultItem.core.readOnly
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
mainItem.contactDeletionRequested(
|
||||
searchResultItem)
|
||||
mainItem.contactDeletionRequested(searchResultItem)
|
||||
friendPopup.close()
|
||||
}
|
||||
style: ButtonStyle.noBackgroundRed
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ AbstractMainPage {
|
|||
property var remoteChat: remoteChatObj ? remoteChatObj.value : null
|
||||
onRemoteChatChanged: {
|
||||
if (remoteChat) selectedChatGui = remoteChat
|
||||
else console.log("chat is null")
|
||||
}
|
||||
|
||||
onSelectedChatGuiChanged: {
|
||||
|
|
|
|||
|
|
@ -368,14 +368,14 @@ FriendGui{
|
|||
anchors.fill: parent
|
||||
contact: mainItem.selectedContact
|
||||
button.color: DefaultStyle.main1_100
|
||||
//: Edit
|
||||
button.text: qsTr("contact_details_edit")
|
||||
button.style: ButtonStyle.tertiary
|
||||
button.icon.source: AppIcons.pencil
|
||||
button.onClicked: mainItem.editContact(mainItem.selectedContact)
|
||||
button.visible: !mainItem.selectedContact?.core.readOnly
|
||||
button.visible: mainItem.selectedContact && mainItem.selectedContact.core.isStored && !mainItem.selectedContact.core.readOnly
|
||||
property string contactAddress: contact ? contact.core.defaultAddress : ""
|
||||
property var computedContactNameObj: UtilsCpp.getDisplayName(
|
||||
contactAddress)
|
||||
property var computedContactNameObj: UtilsCpp.getDisplayName(contactAddress)
|
||||
property string computedContactName: computedContactNameObj ? computedContactNameObj.value : ""
|
||||
property string contactName: contact ? contact.core.fullName : computedContactName
|
||||
component LabelButton: ColumnLayout {
|
||||
|
|
@ -734,15 +734,16 @@ FriendGui{
|
|||
//: "Autres actions"
|
||||
label: qsTr("contact_details_actions_title")
|
||||
content: ColumnLayout {
|
||||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
ColumnLayout {
|
||||
visible: mainItem.selectedContact && mainItem.selectedContact.core.isStored && !mainItem.selectedContact.core.readOnly
|
||||
IconLabelButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)
|
||||
icon.source: AppIcons.pencil
|
||||
//: "Éditer"
|
||||
text: qsTr("contact_details_edit")
|
||||
onClicked: mainItem.editContact(
|
||||
mainItem.selectedContact)
|
||||
visible: !mainItem.selectedContact?.core.readOnly
|
||||
onClicked: mainItem.editContact(mainItem.selectedContact)
|
||||
style: ButtonStyle.noBackground
|
||||
}
|
||||
Rectangle {
|
||||
|
|
@ -750,6 +751,9 @@ FriendGui{
|
|||
Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
visible: mainItem.selectedContact && mainItem.selectedContact.core.isStored && !mainItem.selectedContact.core.readOnly
|
||||
IconLabelButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)
|
||||
|
|
@ -771,6 +775,7 @@ FriendGui{
|
|||
Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
}
|
||||
IconLabelButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)
|
||||
|
|
@ -804,11 +809,6 @@ FriendGui{
|
|||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
// IconLabelButton {
|
||||
// Layout.fillWidth: true
|
||||
// Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)
|
||||
|
|
@ -833,13 +833,19 @@ FriendGui{
|
|||
// Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
|
||||
// color: DefaultStyle.main2_200
|
||||
// }
|
||||
ColumnLayout {
|
||||
visible: mainItem.selectedContact && mainItem.selectedContact.core.isStored && !mainItem.selectedContact.core.readOnly
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.max(Math.round(1 * DefaultStyle.dp), 1)
|
||||
color: DefaultStyle.main2_200
|
||||
}
|
||||
IconLabelButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.round(50 * DefaultStyle.dp)
|
||||
icon.source: AppIcons.trashCan
|
||||
//: "Supprimer ce contact"
|
||||
text: qsTr("contact_details_delete")
|
||||
visible: !mainItem.selectedContact?.core.readOnly
|
||||
onClicked: {
|
||||
mainItem.deleteContact(
|
||||
mainItem.selectedContact)
|
||||
|
|
@ -848,6 +854,7 @@ FriendGui{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue