fix #LINQT-1868 magic search list display name/addresses ui
This commit is contained in:
parent
e0cb654746
commit
3a7ec59336
6 changed files with 15 additions and 8 deletions
|
|
@ -115,10 +115,13 @@ void MagicSearchList::setSelf(QSharedPointer<MagicSearchList> me) {
|
||||||
splitted.removeFirst();
|
splitted.removeFirst();
|
||||||
contact->setFamilyName(splitted.join(" "));
|
contact->setFamilyName(splitted.join(" "));
|
||||||
} else {
|
} else {
|
||||||
contact->setGivenName(Utils::coreStringToAppString(address->getUsername()));
|
contact->setGivenName(displayName.isEmpty()
|
||||||
|
? Utils::coreStringToAppString(address->getUsername())
|
||||||
|
: displayName);
|
||||||
}
|
}
|
||||||
contact->setDefaultFullAddress(Utils::coreStringToAppString(
|
contact->setDefaultFullAddress(Utils::coreStringToAppString(
|
||||||
address->asString())); // linphone Friend object remove specific address.
|
address->asString())); // linphone Friend object remove specific address.
|
||||||
|
contact->setDefaultAddress(Utils::coreStringToAppString(address->asString()));
|
||||||
contacts->append(contact);
|
contacts->append(contact);
|
||||||
} else if (!it->getPhoneNumber().empty()) {
|
} else if (!it->getPhoneNumber().empty()) {
|
||||||
auto phoneNumber = it->getPhoneNumber();
|
auto phoneNumber = it->getPhoneNumber();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ Flickable {
|
||||||
flickableDirection: Flickable.VerticalFlick
|
flickableDirection: Flickable.VerticalFlick
|
||||||
|
|
||||||
property bool showInitials: true // Display Initials of Display name.
|
property bool showInitials: true // Display Initials of Display name.
|
||||||
property bool showDefaultAddress: true // Display address below display name.
|
|
||||||
property bool showActions: false // Display actions layout (call buttons)
|
property bool showActions: false // Display actions layout (call buttons)
|
||||||
property bool showContactMenu: true // Display the dot menu for contacts.
|
property bool showContactMenu: true // Display the dot menu for contacts.
|
||||||
property bool showFavorites: true // Display the favorites in the header
|
property bool showFavorites: true // Display the favorites in the header
|
||||||
|
|
@ -269,7 +268,7 @@ Flickable {
|
||||||
showActions: mainItem.showActions
|
showActions: mainItem.showActions
|
||||||
showInitials: mainItem.showInitials
|
showInitials: mainItem.showInitials
|
||||||
showContactMenu: mainItem.showContactMenu
|
showContactMenu: mainItem.showContactMenu
|
||||||
showDefaultAddress: mainItem.showDefaultAddress
|
showDefaultAddress: false
|
||||||
selectionEnabled: mainItem.selectionEnabled
|
selectionEnabled: mainItem.selectionEnabled
|
||||||
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
||||||
selectedContacts: mainItem.selectedContacts
|
selectedContacts: mainItem.selectedContacts
|
||||||
|
|
@ -315,7 +314,7 @@ Flickable {
|
||||||
showActions: mainItem.showActions
|
showActions: mainItem.showActions
|
||||||
showInitials: mainItem.showInitials
|
showInitials: mainItem.showInitials
|
||||||
showContactMenu: mainItem.showContactMenu
|
showContactMenu: mainItem.showContactMenu
|
||||||
showDefaultAddress: mainItem.showDefaultAddress
|
showDefaultAddress: false
|
||||||
selectionEnabled: mainItem.selectionEnabled
|
selectionEnabled: mainItem.selectionEnabled
|
||||||
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
||||||
selectedContacts: mainItem.selectedContacts
|
selectedContacts: mainItem.selectedContacts
|
||||||
|
|
@ -368,7 +367,8 @@ Flickable {
|
||||||
highlightText: mainItem.highlightText
|
highlightText: mainItem.highlightText
|
||||||
showActions: mainItem.showActions
|
showActions: mainItem.showActions
|
||||||
showContactMenu: mainItem.showContactMenu
|
showContactMenu: mainItem.showContactMenu
|
||||||
showDefaultAddress: mainItem.showDefaultAddress
|
showDefaultAddress: true
|
||||||
|
showDisplayName: false
|
||||||
selectionEnabled: mainItem.selectionEnabled
|
selectionEnabled: mainItem.selectionEnabled
|
||||||
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
||||||
selectedContacts: mainItem.selectedContacts
|
selectedContacts: mainItem.selectedContacts
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ FocusScope {
|
||||||
property var searchResultItem
|
property var searchResultItem
|
||||||
property bool showInitials: true // Display Initials of Display name.
|
property bool showInitials: true // Display Initials of Display name.
|
||||||
property bool showDefaultAddress: true // Display address below display name.
|
property bool showDefaultAddress: true // Display address below display name.
|
||||||
|
property bool showDisplayName: true // Display name above address.
|
||||||
property bool showActions: false // Display actions layout (call buttons)
|
property bool showActions: false // Display actions layout (call buttons)
|
||||||
property bool showContactMenu: true // Display the dot menu for contacts.
|
property bool showContactMenu: true // Display the dot menu for contacts.
|
||||||
property string highlightText
|
property string highlightText
|
||||||
|
|
@ -77,6 +78,10 @@ FocusScope {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Text {
|
Text {
|
||||||
|
id: displayNameText
|
||||||
|
visible: mainItem.showDisplayName
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: visible ? implicitHeight: 0
|
||||||
text: UtilsCpp.boldTextPart(mainItem.displayName,
|
text: UtilsCpp.boldTextPart(mainItem.displayName,
|
||||||
mainItem.highlightText)
|
mainItem.highlightText)
|
||||||
font {
|
font {
|
||||||
|
|
@ -85,11 +90,11 @@ FocusScope {
|
||||||
weight: mainItem.showDefaultAddress ? Typography.h4.weight : Typography.p1.weight
|
weight: mainItem.showDefaultAddress ? Typography.h4.weight : Typography.p1.weight
|
||||||
}
|
}
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
Layout.topMargin: Math.round(2 * DefaultStyle.dp)
|
Layout.topMargin: Math.round(2 * DefaultStyle.dp)
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: visible ? implicitHeight: 0
|
||||||
visible: mainItem.showDefaultAddress
|
visible: mainItem.showDefaultAddress
|
||||||
property string address: SettingsCpp.hideSipAddresses
|
property string address: SettingsCpp.hideSipAddresses
|
||||||
? UtilsCpp.getUsername(mainItem.addressFromFilter)
|
? UtilsCpp.getUsername(mainItem.addressFromFilter)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ ListView {
|
||||||
property string title
|
property string title
|
||||||
property bool showInitials: true // Display Initials of Display name.
|
property bool showInitials: true // Display Initials of Display name.
|
||||||
property bool showDefaultAddress: true // Display address below display name.
|
property bool showDefaultAddress: true // Display address below display name.
|
||||||
|
property bool showDisplayName: true // Display name above address.
|
||||||
property bool showActions: false // Display actions layout (call buttons)
|
property bool showActions: false // Display actions layout (call buttons)
|
||||||
property bool showContactMenu: true // Display the dot menu for contacts.
|
property bool showContactMenu: true // Display the dot menu for contacts.
|
||||||
property bool showFavorites: true // Display the favorites in the header
|
property bool showFavorites: true // Display the favorites in the header
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,6 @@ Item {
|
||||||
showActions: true
|
showActions: true
|
||||||
showFavorites: false
|
showFavorites: false
|
||||||
selectionEnabled: false
|
selectionEnabled: false
|
||||||
showDefaultAddress: true
|
|
||||||
searchOnEmpty: false
|
searchOnEmpty: false
|
||||||
|
|
||||||
sectionsPixelSize: Typography.p2.pixelSize
|
sectionsPixelSize: Typography.p2.pixelSize
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,6 @@ FriendGui{
|
||||||
Layout.rightMargin: Math.round(8 * DefaultStyle.dp)
|
Layout.rightMargin: Math.round(8 * DefaultStyle.dp)
|
||||||
searchBarText: searchBar.text
|
searchBarText: searchBar.text
|
||||||
hideSuggestions: true
|
hideSuggestions: true
|
||||||
showDefaultAddress: false
|
|
||||||
sourceFlags: LinphoneEnums.MagicSearchSource.Friends
|
sourceFlags: LinphoneEnums.MagicSearchSource.Friends
|
||||||
| LinphoneEnums.MagicSearchSource.FavoriteFriends
|
| LinphoneEnums.MagicSearchSource.FavoriteFriends
|
||||||
| LinphoneEnums.MagicSearchSource.LdapServers
|
| LinphoneEnums.MagicSearchSource.LdapServers
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue