Game filter for games created by buddy (#5991)

This commit is contained in:
RickyRister 2025-06-14 08:10:24 -07:00 committed by GitHub
parent 6cb4e203f1
commit 61a6b32137
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 45 additions and 2 deletions

View file

@ -72,6 +72,17 @@ bool GameFiltersSettings::isHideIgnoredUserGames()
return !(previous == QVariant()) && previous.toBool();
}
void GameFiltersSettings::setHideNotBuddyCreatedGames(bool hide)
{
setValue(hide, "hide_not_buddy_created_games", "filter_games");
}
bool GameFiltersSettings::isHideNotBuddyCreatedGames()
{
QVariant previous = getValue("hide_not_buddy_created_games", "filter_games");
return !(previous == QVariant()) && previous.toBool();
}
void GameFiltersSettings::setGameNameFilter(QString gameName)
{
setValue(gameName, "game_name_filter", "filter_games");

View file

@ -14,6 +14,7 @@ public:
bool isHideGamesThatStarted();
bool isHidePasswordProtectedGames();
bool isHideIgnoredUserGames();
bool isHideNotBuddyCreatedGames();
QString getGameNameFilter();
QString getCreatorNameFilter();
int getMinPlayers();
@ -30,6 +31,7 @@ public:
void setHideFullGames(bool hide);
void setHideGamesThatStarted(bool hide);
void setHidePasswordProtectedGames(bool hide);
void setHideNotBuddyCreatedGames(bool hide);
void setGameNameFilter(QString gameName);
void setCreatorNameFilter(QString creatorName);
void setMinPlayers(int min);