fix typo leading to display more contacts not called

This commit is contained in:
gaelle 2025-04-10 08:19:01 +02:00
parent b52c606a1e
commit 42a6a7a3b7
2 changed files with 34 additions and 32 deletions

View file

@ -91,7 +91,6 @@ void MagicSearchModel::onSearchResultsReceived(const std::shared_ptr<linphone::M
//"
// << (f ? f.get() : nullptr);
bool isLdap = (result->getSourceFlags() & (int)linphone::MagicSearch::Source::LdapServers) != 0;
qInfo() << "result is ldap" << isLdap;
// Do not add it into ldap_friends if it already exists in app_friends.
if (isLdap && f &&
(!fList || fList->getDisplayName() != "app_friends")) { // Double check because of SDK merging that lead to

View file

@ -153,31 +153,31 @@ Flickable {
}
Keys.onPressed: event => {
if (!event.accepted) {
if (event.key == Qt.Key_Up
|| event.key == Qt.Key_Down) {
var newItem
var direction = (event.key == Qt.Key_Up ? -1 : 1)
if (suggestionsList.activeFocus)
newItem = findNextList(suggestionsList, 0,
direction)
else if (contactsList.activeFocus)
newItem = findNextList(contactsList, 0,
direction)
else if (favoritesList.activeFocus)
newItem = findNextList(favoritesList, 0,
direction)
else
newItem = findNextList(suggestionsList, 0,
direction)
if (newItem) {
newItem.selectIndex(
direction > 0 ? -1 : newItem.model.count - 1)
event.accepted = true
}
}
}
}
if (!event.accepted) {
if (event.key == Qt.Key_Up
|| event.key == Qt.Key_Down) {
var newItem
var direction = (event.key == Qt.Key_Up ? -1 : 1)
if (suggestionsList.activeFocus)
newItem = findNextList(suggestionsList, 0,
direction)
else if (contactsList.activeFocus)
newItem = findNextList(contactsList, 0,
direction)
else if (favoritesList.activeFocus)
newItem = findNextList(favoritesList, 0,
direction)
else
newItem = findNextList(suggestionsList, 0,
direction)
if (newItem) {
newItem.selectIndex(
direction > 0 ? -1 : newItem.model.count - 1)
event.accepted = true
}
}
}
}
Component.onCompleted: {
if (confInfoGui) {
for (var i = 0; i < confInfoGui.core.participants.length; ++i) {
@ -217,12 +217,14 @@ Flickable {
}
onAtYEndChanged: if (atYEnd) {
if ((contactsProxy.haveMore && contactList.expanded)
|| mainItem.hideSuggestions)
contactsProxy.displayMore()
else
suggestionsProxy.displayMore()
}
if (favoritesProxy.haveMore && favoritesList.expanded && mainItem.showFavorites)
favoritesProxy.displayMore()
else if (contactsProxy.haveMore && contactsList.expanded) {
contactsProxy.displayMore()
}
else
suggestionsProxy.displayMore()
}
Behavior on contentY {
NumberAnimation {
duration: 500
@ -293,6 +295,7 @@ Flickable {
}
property MagicSearchProxy proxy: MagicSearchProxy {
id: favoritesProxy
parentProxy: mainItem.mainModel
filterType: MagicSearchProxy.FilteringTypes.Favorites
}