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 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions 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,8 +1750,7 @@ 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());
notifyNameGroupsChanged(m_contactNameGroups.keys());
}
}
}
Expand Down

0 comments on commit b36bd12

Please sign in to comment.