[UserList] Unify friends/online/ignored list with section dividers and add search bar.

Took 31 minutes

Took 7 seconds
This commit is contained in:
Lukas Brübach 2026-08-14 20:17:15 +02:00
parent daa896866f
commit 46d3dba6b4
10 changed files with 692 additions and 69 deletions

View file

@ -170,6 +170,12 @@ bool InterfaceSettings::getBattlefieldFlashEnabled() const
return getValue("battlefieldFlashEnabled", QString(), QString(), true).toBool();
}
QStringList InterfaceSettings::getUserListExpandedSections() const
{
return getValue("userListExpandedSections", QString(), QString(), QStringList({"buddy", "online", "ignore"}))
.toStringList();
}
void InterfaceSettings::setUseTearOffMenus(bool _useTearOffMenus)
{
setValue(_useTearOffMenus, "useTearOffMenus");
@ -348,3 +354,8 @@ void InterfaceSettings::setBattlefieldFlashEnabled(bool _battlefieldFlashEnabled
setValue(_battlefieldFlashEnabled, "battlefieldFlashEnabled");
emit battlefieldFlashEnabledChanged(_battlefieldFlashEnabled);
}
void InterfaceSettings::setUserListExpandedSections(const QStringList &sections)
{
setValue(sections, "userListExpandedSections");
}

View file

@ -44,6 +44,7 @@ public:
[[nodiscard]] bool getShowGameSelectorFilterToolbar() const override;
[[nodiscard]] bool getLifeCounterAnimationsEnabled() const override;
[[nodiscard]] bool getBattlefieldFlashEnabled() const override;
[[nodiscard]] QStringList getUserListExpandedSections() const override;
void setUseTearOffMenus(bool _useTearOffMenus);
void setCardViewInitialRowsMax(int _cardViewInitialRowsMax);
@ -78,6 +79,7 @@ public:
void setShowGameSelectorFilterToolbar(bool _showGameSelectorFilterToolbar);
void setLifeCounterAnimationsEnabled(bool _lifeCounterAnimationsEnabled);
void setBattlefieldFlashEnabled(bool _battlefieldFlashEnabled);
void setUserListExpandedSections(const QStringList &sections);
signals:
void useTearOffMenusChanged(bool state);