Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[libcontacts] Update the synchronizeList function
Also restore pre-fetching of favorite contact details.
  • Loading branch information
matthewvogt committed Jul 18, 2013
1 parent e702826 commit ff44b52
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 187 deletions.
16 changes: 13 additions & 3 deletions src/seasidecache.cpp
Expand Up @@ -1384,6 +1384,15 @@ void SeasideCache::requestStateChanged(QContactAbstractRequest::State state)
cacheItem->itemData->mergeCandidatesFetched(candidateIds);
}
}
else if (m_fetchFilter != FilterNone) {
// We have completed fetching this filter set
completeSynchronizeList(
this,
m_contacts[m_fetchFilter],
m_cacheIndex,
m_contactIdRequest.ids(),
m_queryIndex);
}
} else if (request == &m_relationshipSaveRequest || request == &m_relationshipRemoveRequest) {
QSet<ContactIdType> contactIds;
foreach (const QContactRelationship &relationship, m_relationshipSaveRequest.relationships() +
Expand Down Expand Up @@ -1614,9 +1623,10 @@ void SeasideCache::keepPopulated()
if (!m_keepPopulated) {
m_keepPopulated = true;

// Start a query to fully populate the cache
m_refreshRequired = true;
requestUpdate();
// Start a query to fully populate the cache, starting with favorites
m_fetchFilter = FilterFavorites;
m_fetchRequest.setFilter(QContactFavorite::match());
m_fetchRequest.start();
}
}

Expand Down

0 comments on commit ff44b52

Please sign in to comment.