diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 5503f7ed1..116236af1 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2261,6 +2261,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "ktg_settings_fonts" = "Change application fonts"; "ktg_settings_network" = "Network"; "ktg_settings_net_speed_boost" = "Speed boost"; +"ktg_settings_other" = "Other"; +"ktg_settings_show_phone_number" = "Show phone in drawer"; +"ktg_settings_show_chat_id" = "Show chat ID"; "ktg_fonts_title" = "Fonts"; "ktg_fonts_reset" = "Reset"; diff --git a/Telegram/Resources/langs/rewrites/ru.json b/Telegram/Resources/langs/rewrites/ru.json index fc853aa2c..54378c5e6 100644 --- a/Telegram/Resources/langs/rewrites/ru.json +++ b/Telegram/Resources/langs/rewrites/ru.json @@ -35,6 +35,9 @@ "ktg_settings_fonts": "Изменить шрифты приложения", "ktg_settings_network": "Сеть", "ktg_settings_net_speed_boost": "Ускорение загрузки", + "ktg_settings_other": "Прочие", + "ktg_settings_show_phone_number": "Показывать телефон в боковом меню", + "ktg_settings_show_chat_id": "Показывать ID чата", "ktg_fonts_title": "Шрифты", "ktg_fonts_reset": "Сброс", "ktg_fonts_about": "Если вы хотите использовать жирное начертание для полужирного шрифта, не пишите «Bold» в названии, используйте настройку «Сделать полужирный жирным».\n\nДля применения и просмотра изменений требуется перезапуск.", diff --git a/Telegram/SourceFiles/settings/settings_kotato.cpp b/Telegram/SourceFiles/settings/settings_kotato.cpp index a6a43c574..8a42d5486 100644 --- a/Telegram/SourceFiles/settings/settings_kotato.cpp +++ b/Telegram/SourceFiles/settings/settings_kotato.cpp @@ -128,6 +128,42 @@ void SetupKotatoNetwork(not_null container) { AddSkip(container); } +void SetupKotatoOther(not_null container) { + AddDivider(container); + AddSkip(container); + AddSubsectionTitle(container, tr::ktg_settings_other()); + + AddButton( + container, + tr::ktg_settings_show_phone_number(), + st::settingsButton + )->toggleOn( + rpl::single(cShowPhoneInDrawer()) + )->toggledValue( + ) | rpl::filter([](bool enabled) { + return (enabled != cShowPhoneInDrawer()); + }) | rpl::start_with_next([](bool enabled) { + cSetShowPhoneInDrawer(enabled); + KotatoSettings::Write(); + }, container->lifetime()); + + AddButton( + container, + tr::ktg_settings_show_chat_id(), + st::settingsButton + )->toggleOn( + rpl::single(cShowChatId()) + )->toggledValue( + ) | rpl::filter([](bool enabled) { + return (enabled != cShowChatId()); + }) | rpl::start_with_next([](bool enabled) { + cSetShowChatId(enabled); + KotatoSettings::Write(); + }, container->lifetime()); + + AddSkip(container); +} + Kotato::Kotato( QWidget *parent, not_null controller) @@ -139,9 +175,8 @@ void Kotato::setupContent(not_null controller) { const auto content = Ui::CreateChild(this); SetupKotatoChats(content); - //SetupKotatoFonts(content); SetupKotatoNetwork(content); - //SetupKotatoOther(content); + SetupKotatoOther(content); Ui::ResizeFitChild(this, content); } diff --git a/Telegram/SourceFiles/settings/settings_kotato.h b/Telegram/SourceFiles/settings/settings_kotato.h index 53c2b646f..30136c597 100644 --- a/Telegram/SourceFiles/settings/settings_kotato.h +++ b/Telegram/SourceFiles/settings/settings_kotato.h @@ -14,9 +14,8 @@ class BoxContent; namespace Settings { void SetupKotatoChats(not_null container); -//void SetupKotatoFonts(not_null container); void SetupKotatoNetwork(not_null container); -//void SetupKotatoOther(not_null container); +void SetupKotatoOther(not_null container); class Kotato : public Section { public: