From 9ae35978d8251a398c4a55e056ac0aa1222f97a8 Mon Sep 17 00:00:00 2001 From: Matt Vogt Date: Wed, 30 Jul 2014 16:20:29 +1000 Subject: [PATCH] [libcontacts] Only update merge candidates with correct results When the filter is not none, the ID query results do not apply to the merge candidate filter. --- src/seasidecache.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/seasidecache.cpp b/src/seasidecache.cpp index fc65a26..8352477 100644 --- a/src/seasidecache.cpp +++ b/src/seasidecache.cpp @@ -2398,14 +2398,13 @@ void SeasideCache::notifyNameGroupsChanged(const QSet &groups) void SeasideCache::contactIdsAvailable() { - if (!m_contactsToFetchCandidates.isEmpty()) { - foreach (const QContactId &id, m_contactIdRequest.ids()) { - m_candidateIds.insert(id); + if (m_syncFilter == FilterNone) { + if (!m_contactsToFetchCandidates.isEmpty()) { + foreach (const QContactId &id, m_contactIdRequest.ids()) { + m_candidateIds.insert(id); + } } - return; - } - - if (m_syncFilter != FilterNone) { + } else { synchronizeList(this, m_contacts[m_syncFilter], m_cacheIndex, internalIds(m_contactIdRequest.ids()), m_queryIndex); } }