Commit 4d7ccc71 authored by mvogt's avatar mvogt

[libcontacts] Provide function to refresh contact details from backend

parent 2aec0bc4
......@@ -687,12 +687,17 @@ QContact SeasideCache::contactById(const ContactIdType &id)
void SeasideCache::ensureCompletion(CacheItem *cacheItem)
{
if (cacheItem->contactState < ContactRequested) {
cacheItem->contactState = ContactRequested;
instancePtr->m_changedContacts.append(cacheItem->apiId());
instancePtr->fetchContacts();
refreshContact(cacheItem);
}
}
void SeasideCache::refreshContact(CacheItem *cacheItem)
{
cacheItem->contactState = ContactRequested;
instancePtr->m_changedContacts.append(cacheItem->apiId());
instancePtr->fetchContacts();
}
SeasideCache::CacheItem *SeasideCache::itemByPhoneNumber(const QString &number, bool requireComplete)
{
QString normalizedNumber = Normalization::normalizePhoneNumber(number);
......
......@@ -302,6 +302,7 @@ public:
static QContact contactById(const ContactIdType &id);
static void ensureCompletion(CacheItem *cacheItem);
static void refreshContact(CacheItem *cacheItem);
static QChar nameGroup(const CacheItem *cacheItem);
static QChar determineNameGroup(const CacheItem *cacheItem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment