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

Commit

Permalink
Merge branch 'jb45836v2' into 'master'
Browse files Browse the repository at this point in the history
[libcontacts] Also update section bucket index cache during list synchronisation. Contributes to JB#45836

See merge request mer-core/libcontacts!12
  • Loading branch information
chriadam committed May 17, 2019
2 parents 80096fb + 74aa135 commit 699abb0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/seasidecache.cpp
Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 699abb0

Please sign in to comment.