2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 14:17:45 +00:00

Added "disable Up to edit" to options menu

This commit is contained in:
RadRussianRus 2020-02-03 08:12:47 +03:00
parent 72a6fd4dd8
commit fe75a9f0b7
3 changed files with 17 additions and 0 deletions

View File

@ -2313,6 +2313,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ktg_settings_sticker_height" = "Sticker height: {pixels}px"; "ktg_settings_sticker_height" = "Sticker height: {pixels}px";
"ktg_settings_emoji_outline" = "Big emoji outline"; "ktg_settings_emoji_outline" = "Big emoji outline";
"ktg_settings_disable_up_edit" = "Disable edit by Up key";
"ktg_settings_always_show_scheduled" = "Always show scheduled"; "ktg_settings_always_show_scheduled" = "Always show scheduled";
"ktg_settings_chat_list_compact" = "Compact chat list"; "ktg_settings_chat_list_compact" = "Compact chat list";

View File

@ -50,6 +50,7 @@
"ktg_settings_chats": "Чаты", "ktg_settings_chats": "Чаты",
"ktg_settings_sticker_height": "Высота стикеров: {pixels} пикс.", "ktg_settings_sticker_height": "Высота стикеров: {pixels} пикс.",
"ktg_settings_emoji_outline": "Обводка у больших эмодзи", "ktg_settings_emoji_outline": "Обводка у больших эмодзи",
"ktg_settings_disable_up_edit": "Отключить редактирование по «Вверх»",
"ktg_settings_always_show_scheduled": "Всегда показывать отложенные", "ktg_settings_always_show_scheduled": "Всегда показывать отложенные",
"ktg_settings_chat_list_compact": "Компактный список чатов", "ktg_settings_chat_list_compact": "Компактный список чатов",
"ktg_fonts_title": "Шрифты", "ktg_fonts_title": "Шрифты",

View File

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