mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
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();
|
||||
contact->setFamilyName(splitted.join(" "));
|
||||
} else {
|
||||
contact->setGivenName(Utils::coreStringToAppString(address->getUsername()));
|
||||
contact->setGivenName(displayName.isEmpty()
|
||||
? Utils::coreStringToAppString(address->getUsername())
|
||||
: displayName);
|
||||
}
|
||||
contact->setDefaultFullAddress(Utils::coreStringToAppString(
|
||||
address->asString())); // linphone Friend object remove specific address.
|
||||
contact->setDefaultAddress(Utils::coreStringToAppString(address->asString()));
|
||||
contacts->append(contact);
|
||||
} else if (!it->getPhoneNumber().empty()) {
|
||||
auto phoneNumber = it->getPhoneNumber();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ Flickable {
|
|||
flickableDirection: Flickable.VerticalFlick
|
||||
|
||||
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 showContactMenu: true // Display the dot menu for contacts.
|
||||
property bool showFavorites: true // Display the favorites in the header
|
||||
|
|
@ -269,7 +268,7 @@ Flickable {
|
|||
showActions: mainItem.showActions
|
||||
showInitials: mainItem.showInitials
|
||||
showContactMenu: mainItem.showContactMenu
|
||||
showDefaultAddress: mainItem.showDefaultAddress
|
||||
showDefaultAddress: false
|
||||
selectionEnabled: mainItem.selectionEnabled
|
||||
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
||||
selectedContacts: mainItem.selectedContacts
|
||||
|
|
@ -315,7 +314,7 @@ Flickable {
|
|||
showActions: mainItem.showActions
|
||||
showInitials: mainItem.showInitials
|
||||
showContactMenu: mainItem.showContactMenu
|
||||
showDefaultAddress: mainItem.showDefaultAddress
|
||||
showDefaultAddress: false
|
||||
selectionEnabled: mainItem.selectionEnabled
|
||||
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
||||
selectedContacts: mainItem.selectedContacts
|
||||
|
|
@ -368,7 +367,8 @@ Flickable {
|
|||
highlightText: mainItem.highlightText
|
||||
showActions: mainItem.showActions
|
||||
showContactMenu: mainItem.showContactMenu
|
||||
showDefaultAddress: mainItem.showDefaultAddress
|
||||
showDefaultAddress: true
|
||||
showDisplayName: false
|
||||
selectionEnabled: mainItem.selectionEnabled
|
||||
multiSelectionEnabled: mainItem.multiSelectionEnabled
|
||||
selectedContacts: mainItem.selectedContacts
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ FocusScope {
|
|||
property var searchResultItem
|
||||
property bool showInitials: true // Display Initials of 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 showContactMenu: true // Display the dot menu for contacts.
|
||||
property string highlightText
|
||||
|
|
@ -77,6 +78,10 @@ FocusScope {
|
|||
ColumnLayout {
|
||||
spacing: 0
|
||||
Text {
|
||||
id: displayNameText
|
||||
visible: mainItem.showDisplayName
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: visible ? implicitHeight: 0
|
||||
text: UtilsCpp.boldTextPart(mainItem.displayName,
|
||||
mainItem.highlightText)
|
||||
font {
|
||||
|
|
@ -85,11 +90,11 @@ FocusScope {
|
|||
weight: mainItem.showDefaultAddress ? Typography.h4.weight : Typography.p1.weight
|
||||
}
|
||||
maximumLineCount: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Text {
|
||||
Layout.topMargin: Math.round(2 * DefaultStyle.dp)
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: visible ? implicitHeight: 0
|
||||
visible: mainItem.showDefaultAddress
|
||||
property string address: SettingsCpp.hideSipAddresses
|
||||
? UtilsCpp.getUsername(mainItem.addressFromFilter)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ ListView {
|
|||
property string title
|
||||
property bool showInitials: true // Display Initials of 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 showContactMenu: true // Display the dot menu for contacts.
|
||||
property bool showFavorites: true // Display the favorites in the header
|
||||
|
|
|
|||
|
|
@ -282,7 +282,6 @@ Item {
|
|||
showActions: true
|
||||
showFavorites: false
|
||||
selectionEnabled: false
|
||||
showDefaultAddress: true
|
||||
searchOnEmpty: false
|
||||
|
||||
sectionsPixelSize: Typography.p2.pixelSize
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@ FriendGui{
|
|||
Layout.rightMargin: Math.round(8 * DefaultStyle.dp)
|
||||
searchBarText: searchBar.text
|
||||
hideSuggestions: true
|
||||
showDefaultAddress: false
|
||||
sourceFlags: LinphoneEnums.MagicSearchSource.Friends
|
||||
| LinphoneEnums.MagicSearchSource.FavoriteFriends
|
||||
| LinphoneEnums.MagicSearchSource.LdapServers
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue