mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
fix: hideNotificationCounters
This commit is contained in:
parent
1935a2b144
commit
8bfb7e221b
1 changed files with 7 additions and 1 deletions
|
@ -817,11 +817,17 @@ void Widget::setupMainMenuToggle() {
|
||||||
|
|
||||||
Window::OtherAccountsUnreadState(
|
Window::OtherAccountsUnreadState(
|
||||||
) | rpl::start_with_next([=](const Window::OthersUnreadState &state) {
|
) | rpl::start_with_next([=](const Window::OthersUnreadState &state) {
|
||||||
const auto icon = !state.count
|
auto icon = !state.count
|
||||||
? nullptr
|
? nullptr
|
||||||
: !state.allMuted
|
: !state.allMuted
|
||||||
? &st::dialogsMenuToggleUnread
|
? &st::dialogsMenuToggleUnread
|
||||||
: &st::dialogsMenuToggleUnreadMuted;
|
: &st::dialogsMenuToggleUnreadMuted;
|
||||||
|
|
||||||
|
const auto settings = &AyuSettings::getInstance();
|
||||||
|
if (settings->hideNotificationCounters) {
|
||||||
|
icon = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
_mainMenu.toggle->setIconOverride(icon, icon);
|
_mainMenu.toggle->setIconOverride(icon, icon);
|
||||||
}, _mainMenu.toggle->lifetime());
|
}, _mainMenu.toggle->lifetime());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue