fix typo leading to display more contacts not called
This commit is contained in:
parent
b52c606a1e
commit
42a6a7a3b7
2 changed files with 34 additions and 32 deletions
|
|
@ -91,7 +91,6 @@ void MagicSearchModel::onSearchResultsReceived(const std::shared_ptr<linphone::M
|
||||||
//"
|
//"
|
||||||
// << (f ? f.get() : nullptr);
|
// << (f ? f.get() : nullptr);
|
||||||
bool isLdap = (result->getSourceFlags() & (int)linphone::MagicSearch::Source::LdapServers) != 0;
|
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.
|
// Do not add it into ldap_friends if it already exists in app_friends.
|
||||||
if (isLdap && f &&
|
if (isLdap && f &&
|
||||||
(!fList || fList->getDisplayName() != "app_friends")) { // Double check because of SDK merging that lead to
|
(!fList || fList->getDisplayName() != "app_friends")) { // Double check because of SDK merging that lead to
|
||||||
|
|
|
||||||
|
|
@ -153,31 +153,31 @@ Flickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onPressed: event => {
|
Keys.onPressed: event => {
|
||||||
if (!event.accepted) {
|
if (!event.accepted) {
|
||||||
if (event.key == Qt.Key_Up
|
if (event.key == Qt.Key_Up
|
||||||
|| event.key == Qt.Key_Down) {
|
|| event.key == Qt.Key_Down) {
|
||||||
var newItem
|
var newItem
|
||||||
var direction = (event.key == Qt.Key_Up ? -1 : 1)
|
var direction = (event.key == Qt.Key_Up ? -1 : 1)
|
||||||
if (suggestionsList.activeFocus)
|
if (suggestionsList.activeFocus)
|
||||||
newItem = findNextList(suggestionsList, 0,
|
newItem = findNextList(suggestionsList, 0,
|
||||||
direction)
|
direction)
|
||||||
else if (contactsList.activeFocus)
|
else if (contactsList.activeFocus)
|
||||||
newItem = findNextList(contactsList, 0,
|
newItem = findNextList(contactsList, 0,
|
||||||
direction)
|
direction)
|
||||||
else if (favoritesList.activeFocus)
|
else if (favoritesList.activeFocus)
|
||||||
newItem = findNextList(favoritesList, 0,
|
newItem = findNextList(favoritesList, 0,
|
||||||
direction)
|
direction)
|
||||||
else
|
else
|
||||||
newItem = findNextList(suggestionsList, 0,
|
newItem = findNextList(suggestionsList, 0,
|
||||||
direction)
|
direction)
|
||||||
if (newItem) {
|
if (newItem) {
|
||||||
newItem.selectIndex(
|
newItem.selectIndex(
|
||||||
direction > 0 ? -1 : newItem.model.count - 1)
|
direction > 0 ? -1 : newItem.model.count - 1)
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (confInfoGui) {
|
if (confInfoGui) {
|
||||||
for (var i = 0; i < confInfoGui.core.participants.length; ++i) {
|
for (var i = 0; i < confInfoGui.core.participants.length; ++i) {
|
||||||
|
|
@ -217,12 +217,14 @@ Flickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
onAtYEndChanged: if (atYEnd) {
|
onAtYEndChanged: if (atYEnd) {
|
||||||
if ((contactsProxy.haveMore && contactList.expanded)
|
if (favoritesProxy.haveMore && favoritesList.expanded && mainItem.showFavorites)
|
||||||
|| mainItem.hideSuggestions)
|
favoritesProxy.displayMore()
|
||||||
contactsProxy.displayMore()
|
else if (contactsProxy.haveMore && contactsList.expanded) {
|
||||||
else
|
contactsProxy.displayMore()
|
||||||
suggestionsProxy.displayMore()
|
}
|
||||||
}
|
else
|
||||||
|
suggestionsProxy.displayMore()
|
||||||
|
}
|
||||||
Behavior on contentY {
|
Behavior on contentY {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 500
|
duration: 500
|
||||||
|
|
@ -293,6 +295,7 @@ Flickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
property MagicSearchProxy proxy: MagicSearchProxy {
|
property MagicSearchProxy proxy: MagicSearchProxy {
|
||||||
|
id: favoritesProxy
|
||||||
parentProxy: mainItem.mainModel
|
parentProxy: mainItem.mainModel
|
||||||
filterType: MagicSearchProxy.FilteringTypes.Favorites
|
filterType: MagicSearchProxy.FilteringTypes.Favorites
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue