mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 04:32:15 -04:00
Merge pull request #791 from kiwix/fix_other_filtering
Correctly set the "acceptTags" when we filter by tags.
This commit is contained in:
commit
969746913f
@ -396,6 +396,7 @@ QStringList ContentManager::getBookIds()
|
|||||||
std::vector<std::string> tags;
|
std::vector<std::string> tags;
|
||||||
if (m_categoryFilter != "all" && m_categoryFilter != "other") {
|
if (m_categoryFilter != "all" && m_categoryFilter != "other") {
|
||||||
tags.push_back("_category:"+m_categoryFilter.toStdString());
|
tags.push_back("_category:"+m_categoryFilter.toStdString());
|
||||||
|
filter.acceptTags(tags);
|
||||||
}
|
}
|
||||||
if (m_categoryFilter == "other") {
|
if (m_categoryFilter == "other") {
|
||||||
for (auto& category: S_CATEGORIES) {
|
for (auto& category: S_CATEGORIES) {
|
||||||
@ -416,7 +417,6 @@ QStringList ContentManager::getBookIds()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filter.acceptTags(tags);
|
|
||||||
filter.query(m_searchQuery.toStdString());
|
filter.query(m_searchQuery.toStdString());
|
||||||
if (m_currentLanguage != "*")
|
if (m_currentLanguage != "*")
|
||||||
filter.lang(m_currentLanguage.toStdString());
|
filter.lang(m_currentLanguage.toStdString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user