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

Commit

Permalink
[libcontacts] Report changes to name groups on contact removal
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewvogt committed Aug 12, 2013
1 parent a6c5183 commit b36bd12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/seasidecache.cpp
Expand Up @@ -828,6 +828,13 @@ void SeasideCache::removeContactData(

m_contacts[filter].remove(row);

if (filter == FilterAll) {
QList<QChar> modifiedNameGroups;
const QChar nameGroup = nameGroupForCacheItem(existingItem(contactId));
removeFromContactNameGroup(internalId(contactId), nameGroup, &modifiedNameGroups);
notifyNameGroupsChanged(modifiedNameGroups);
}

for (int i = 0; i < models.count(); ++i)
models.at(i)->sourceItemsRemoved();
}
Expand Down Expand Up @@ -1743,7 +1750,6 @@ void SeasideCache::appendContacts(const QList<QContact> &contacts, FilterType fi
for (int i = 0; i < models.count(); ++i)
models.at(i)->sourceItemsInserted(begin, end);

if (!m_nameGroupChangeListeners.isEmpty())
notifyNameGroupsChanged(m_contactNameGroups.keys());
}
}
Expand Down

0 comments on commit b36bd12

Please sign in to comment.