feat: add toggles to customization

This commit is contained in:
ZavaruKitsu
2023-11-10 17:36:37 +03:00
parent aa0d733cde
commit ae3dfacdf9
7 changed files with 233 additions and 71 deletions
+3 -2
View File
@@ -100,6 +100,8 @@ void Tray::rebuildMenu() {
[=] { toggleSoundNotifications(); });
}
auto settings = &AyuSettings::getInstance();
auto turnGhostModeText = _textUpdates.events(
) | rpl::map([=]
{
@@ -111,7 +113,6 @@ void Tray::rebuildMenu() {
});
_tray.addAction(std::move(turnGhostModeText), [=]
{
auto settings = &AyuSettings::getInstance();
bool ghostMode = AyuSettings::get_ghostModeEnabled();
settings->set_ghostModeEnabled(!ghostMode);
@@ -119,7 +120,7 @@ void Tray::rebuildMenu() {
AyuSettings::save();
});
if (StreamerMode.value()) {
if (settings->showStreamerToggleInTray) {
auto turnStreamerModeText = _textUpdates.events(
) | rpl::map([=] {
bool streamerModeEnabled = AyuFeatures::StreamerMode::isEnabled();