diff --git a/Telegram/SourceFiles/settings/settings_chat.cpp b/Telegram/SourceFiles/settings/settings_chat.cpp index 8c93409e7..f29f597cc 100644 --- a/Telegram/SourceFiles/settings/settings_chat.cpp +++ b/Telegram/SourceFiles/settings/settings_chat.cpp @@ -907,7 +907,6 @@ void SetupThemeOptions(not_null container) { } void SetupSupport(not_null container) { - AddDivider(container); AddSkip(container); AddSubsectionTitle(container, rpl::single(qsl("Support settings"))); @@ -986,9 +985,6 @@ void Chat::setupContent() { SetupChatBackground(content); SetupStickersEmoji(content); SetupMessages(content); - if (Auth().supportMode()) { - SetupSupport(content); - } Ui::ResizeFitChild(this, content); } diff --git a/Telegram/SourceFiles/settings/settings_chat.h b/Telegram/SourceFiles/settings/settings_chat.h index 5446efe6b..f2d1d16b6 100644 --- a/Telegram/SourceFiles/settings/settings_chat.h +++ b/Telegram/SourceFiles/settings/settings_chat.h @@ -12,8 +12,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace Settings { void SetupDataStorage(not_null container); -void SetupUseDefaultTheme(not_null container); void SetupDefaultThemes(not_null container); +void SetupSupport(not_null container); class Chat : public Section { public: diff --git a/Telegram/SourceFiles/settings/settings_common.cpp b/Telegram/SourceFiles/settings/settings_common.cpp index 52845cbf8..cc6e31d5c 100644 --- a/Telegram/SourceFiles/settings/settings_common.cpp +++ b/Telegram/SourceFiles/settings/settings_common.cpp @@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "boxes/abstract_box.h" #include "lang/lang_keys.h" #include "mainwindow.h" +#include "auth_session.h" #include "styles/style_boxes.h" #include "styles/style_settings.h" @@ -177,9 +178,11 @@ void AddSubsectionTitle( } void FillMenu(Fn showOther, MenuCallback addAction) { - addAction( - lang(lng_settings_information), - [=] { showOther(Type::Information); }); + if (!Auth().supportMode()) { + addAction( + lang(lng_settings_information), + [=] { showOther(Type::Information); }); + } addAction( lang(lng_settings_logout), [=] { App::wnd()->onLogout(); }); diff --git a/Telegram/SourceFiles/settings/settings_main.cpp b/Telegram/SourceFiles/settings/settings_main.cpp index ed5006ac6..cc1102836 100644 --- a/Telegram/SourceFiles/settings/settings_main.cpp +++ b/Telegram/SourceFiles/settings/settings_main.cpp @@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "settings/settings_common.h" #include "settings/settings_codes.h" +#include "settings/settings_chat.h" #include "boxes/language_box.h" #include "boxes/confirm_box.h" #include "boxes/about_box.h" @@ -63,10 +64,17 @@ void SetupSections( icon )->addClickHandler([=] { showOther(type); }); }; - addSection( - lng_settings_information, - Type::Information, - &st::settingsIconInformation); + if (Auth().supportMode()) { + SetupSupport(container); + + AddDivider(container); + AddSkip(container); + } else { + addSection( + lng_settings_information, + Type::Information, + &st::settingsIconInformation); + } addSection( lng_settings_section_notify, Type::Notifications,