Skip to content

Commit

Permalink
Don't do unnecessary opds requests
Browse files Browse the repository at this point in the history
Added checks to not let unnecessary requests to remote library happen.
  • Loading branch information
juuz0 committed Jul 12, 2023
1 parent 33af7a3 commit 09eb115
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/contentmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,17 @@ void ContentManager::setCurrentLanguage(QString language)
kiwix::converta2toa3(language.toStdString()));
} catch (std::out_of_range&) {}
}
if (m_currentLanguage == language)
return;
m_currentLanguage = language;
emit(currentLangChanged());
emit(filterParamsChanged());
}

void ContentManager::setCurrentCategoryFilter(QString category)
{
if (m_categoryFilter == category)
return;
m_categoryFilter = category.toLower();
emit(filterParamsChanged());
}
Expand Down

0 comments on commit 09eb115

Please sign in to comment.