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

Commit

Permalink
Merge pull request #36 from matthewvogt/fix-name-group-count
Browse files Browse the repository at this point in the history
[libcontacts] Do not modify name groups during list sync
  • Loading branch information
matthewvogt committed Sep 20, 2013
2 parents ba4b971 + bb3e568 commit 801dfdc
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/seasidecache.cpp
Expand Up @@ -1845,17 +1845,10 @@ void SeasideCache::removeRange(FilterType filter, int index, int count)
for (int i = 0; i < models.count(); ++i)
models[i]->sourceAboutToRemoveItems(index, index + count - 1);

QSet<QString> modifiedNameGroups;

for (int i = 0; i < count; ++i) {
if (filter == FilterAll) {
const quint32 iid = cacheIds.at(index);
m_expiredContacts[apiId(iid)] -= 1;

const QString group(nameGroup(existingItem(iid)));
if (!group.isNull()) {
removeFromContactNameGroup(iid, group, &modifiedNameGroups);
}
}

m_contactIndices[filter].remove(cacheIds.at(index));
Expand All @@ -1864,8 +1857,6 @@ void SeasideCache::removeRange(FilterType filter, int index, int count)

for (int i = 0; i < models.count(); ++i)
models[i]->sourceItemsRemoved();

notifyNameGroupsChanged(modifiedNameGroups);
}

int SeasideCache::insertRange(FilterType filter, int index, int count, const QList<quint32> &queryIds, int queryIndex)
Expand Down

0 comments on commit 801dfdc

Please sign in to comment.