Commit 0741892f authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

ETM: only populate collections with matching mimetype

If the ETM's Monitor explictly monitors only certain mimetypes, then
only populate Collections matching the given mimetypes. Otherwise
we might end up populating collections that we know about only because
they are ancestors of collections that match the mimetype filter.
parent 2dc7fbf5
......@@ -470,7 +470,10 @@ void EntityTreeModelPrivate::collectionsFetched(const Akonadi::Collection::List
if (m_itemPopulation == EntityTreeModel::ImmediatePopulation) {
foreach (const Collection::Id &collectionId, collectionIt.value()) {
fetchItems(m_collections.value(collectionId));
const auto col = m_collections.value(collectionId);
if (m_mimeChecker.wantedMimeTypes().isEmpty() || m_mimeChecker.isWantedCollection(col)) {
fetchItems(m_collections.value(collectionId));
}
}
}
}
......
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