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] Do not overwrite HasValidOnlineAccount flag
The HasValidOnlineAccount flag is not present in the data received from
the backend, and must be preserved when that is updated.
  • Loading branch information
matthewvogt committed Dec 11, 2013
1 parent 3ff4e05 commit 1c8b9fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/seasidecache.cpp
Expand Up @@ -1796,7 +1796,9 @@ void SeasideCache::updateCache(CacheItem *item, const QContact &contact, bool pa
item->contactState = ContactComplete;
}

item->statusFlags = contact.detail<QContactStatusFlags>().flagsValue();
// Preserve the value of HasValidOnlineAccount, which is held only in the cache
const int hasValidFlagValue = item->statusFlags & HasValidOnlineAccount;
item->statusFlags = contact.detail<QContactStatusFlags>().flagsValue() | hasValidFlagValue;

if (item->itemData) {
item->itemData->updateContact(contact, &item->contact, item->contactState);
Expand Down

0 comments on commit 1c8b9fa

Please sign in to comment.