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 20, 2023
1 parent 283f488 commit 114d1ff
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 114d1ff

Please sign in to comment.