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

Commit

Permalink
[libcontacts] Report presence changes via attached models
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewvogt committed Sep 2, 2013
1 parent 9e2d65e commit f93fb41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/seasidecache.cpp
Expand Up @@ -1660,8 +1660,15 @@ void SeasideCache::contactsAvailable()
}
}

bool roleDataChanged = false;

// This is a simplification of reality, should we test more changes?
bool roleDataChanged = contact.detail<QContactAvatar>().imageUrl() != item->contact.detail<QContactAvatar>().imageUrl();
if (!partialFetch || queryDetailTypes.contains(detailType<QContactAvatar>())) {
roleDataChanged |= (contact.details<QContactAvatar>() != item->contact.details<QContactAvatar>());
}
if (!partialFetch || queryDetailTypes.contains(detailType<QContactGlobalPresence>())) {
roleDataChanged |= (contact.detail<QContactGlobalPresence>() != item->contact.detail<QContactGlobalPresence>());
}

roleDataChanged |= updateContactIndexing(item->contact, contact, iid, queryDetailTypes, item);

Expand Down

0 comments on commit f93fb41

Please sign in to comment.