Move support to the main settings (support).

This commit is contained in:
John Preston 2018-10-07 14:42:09 +03:00
parent 1b4f3a7529
commit 6ba0755e15
4 changed files with 19 additions and 12 deletions

View File

@ -907,7 +907,6 @@ void SetupThemeOptions(not_null<Ui::VerticalLayout*> container) {
}
void SetupSupport(not_null<Ui::VerticalLayout*> 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);
}

View File

@ -12,8 +12,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Settings {
void SetupDataStorage(not_null<Ui::VerticalLayout*> container);
void SetupUseDefaultTheme(not_null<Ui::VerticalLayout*> container);
void SetupDefaultThemes(not_null<Ui::VerticalLayout*> container);
void SetupSupport(not_null<Ui::VerticalLayout*> container);
class Chat : public Section {
public:

View File

@ -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<void(Type)> 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(); });

View File

@ -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,