[GameSelector] Fix bug with hideNotBuddyCreatedGames checkbox (#6858)

This commit is contained in:
RickyRister 2026-05-09 04:08:30 -07:00 committed by GitHub
parent caf2bb9ded
commit 8845a75627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,19 +29,7 @@ GameSelectorQuickFilterToolBar::GameSelectorQuickFilterToolBar(QWidget *parent,
hideGamesNotCreatedByBuddiesCheckBox = new QCheckBox(this);
hideGamesNotCreatedByBuddiesCheckBox->setChecked(filters.hideNotBuddyCreatedGames);
connect(hideGamesNotCreatedByBuddiesCheckBox, &QCheckBox::toggled, this, [this](bool checked) {
applyFilters([&](GameFilterConfigs &configs) {
configs.hideNotBuddyCreatedGames = checked;
if (checked) {
QStringList buddyNames;
for (auto buddy : tabSupervisor->getUserListManager()->getBuddyList().values()) {
buddyNames << QString::fromStdString(buddy.name());
}
configs.creatorNameFilters = buddyNames;
} else {
configs.creatorNameFilters.clear();
}
});
applyFilters([&](GameFilterConfigs &configs) { configs.hideNotBuddyCreatedGames = checked; });
});
hideFullGamesCheckBox = new QCheckBox(this);