Commit 74aa135a authored by chriadam's avatar chriadam

[libcontacts] Also update section bucket index cache during list...

[libcontacts] Also update section bucket index cache during list synchronisation. Contributes to JB#45836

Batch updates are handled via list synchronisation.  We need to
ensure that we update the section bucket index cache of any model
after a list synchronisation occurs.
parent 80096fb6
......@@ -2574,8 +2574,10 @@ void SeasideCache::removeRange(FilterType filter, int index, int count)
cacheIds.removeAt(index);
}
for (int i = 0; i < models.count(); ++i)
for (int i = 0; i < models.count(); ++i) {
models[i]->sourceItemsRemoved();
models[i]->updateSectionBucketIndexCache();
}
}
int SeasideCache::insertRange(FilterType filter, int index, int count, const QList<quint32> &queryIds, int queryIndex)
......@@ -2602,8 +2604,10 @@ int SeasideCache::insertRange(FilterType filter, int index, int count, const QLi
cacheIds.insert(index + i, iid);
}
for (int i = 0; i < models.count(); ++i)
for (int i = 0; i < models.count(); ++i) {
models[i]->sourceItemsInserted(index, end);
models[i]->updateSectionBucketIndexCache();
}
return end - index + 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment