mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
fix: refactor a bit
This commit is contained in:
@@ -92,8 +92,7 @@ void Tray::rebuildMenu() {
|
||||
|
||||
auto turnGhostModeText = _textUpdates.events(
|
||||
) | rpl::map([=] {
|
||||
auto settings = &AyuSettings::getInstance();
|
||||
bool ghostModeEnabled = settings->get_ghostModeEnabled();
|
||||
bool ghostModeEnabled = AyuSettings::get_ghostModeEnabled();
|
||||
|
||||
return ghostModeEnabled
|
||||
? tr::ayu_DisableGhostMode(tr::now)
|
||||
@@ -102,7 +101,7 @@ void Tray::rebuildMenu() {
|
||||
|
||||
_tray.addAction(std::move(turnGhostModeText), [=] {
|
||||
auto settings = &AyuSettings::getInstance();
|
||||
bool ghostMode = !settings->get_ghostModeEnabled();
|
||||
bool ghostMode = !AyuSettings::get_ghostModeEnabled();
|
||||
|
||||
settings->set_sendReadPackets(!ghostMode);
|
||||
settings->set_sendOnlinePackets(!ghostMode);
|
||||
|
||||
Reference in New Issue
Block a user