2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Added mute in top bar option

This commit is contained in:
RadRussianRus
2020-03-30 19:56:08 +03:00
parent 9db3202593
commit 1fa9e981ec
3 changed files with 18 additions and 1 deletions

View File

@@ -2469,4 +2469,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ktg_settings_filters_hide_edit" = "Hide Edit button";
"ktg_settings_filters_hide_folder_names" = "Compact folders";
"ktg_settings_top_bar_mute" = "Mute in profile top bar";
// Keys finished

View File

@@ -104,5 +104,6 @@
"ktg_settings_filters": "Папки",
"ktg_settings_filters_only_unmuted_counter": "Не считать чаты без уведомлений",
"ktg_settings_filters_hide_edit": "Скрыть кнопку изменения",
"ktg_settings_filters_hide_folder_names": "Компактные папки"
"ktg_settings_filters_hide_folder_names": "Компактные папки",
"ktg_settings_top_bar_mute": "Уведомления вверху профиля"
}

View File

@@ -173,6 +173,20 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
KotatoSettings::Write();
}, container->lifetime());
AddButton(
container,
tr::ktg_settings_top_bar_mute(),
st::settingsButton
)->toggleOn(
rpl::single(cProfileTopBarNotifications())
)->toggledValue(
) | rpl::filter([](bool enabled) {
return (enabled != cProfileTopBarNotifications());
}) | rpl::start_with_next([](bool enabled) {
cSetProfileTopBarNotifications(enabled);
KotatoSettings::Write();
}, container->lifetime());
AddButton(
container,
tr::ktg_settings_fonts(),