2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Allow adding Settings::Section-s without changing Type.

This commit is contained in:
John Preston
2022-04-01 15:53:23 +04:00
parent 6716c08306
commit aa7143a831
56 changed files with 318 additions and 179 deletions

View File

@@ -76,6 +76,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/file_upload.h"
#include "facades.h"
#include "window/themes/window_theme.h"
#include "settings/settings_main.h"
#include "settings/settings_privacy_security.h"
#include "styles/style_window.h"
#include "styles/style_dialogs.h"
#include "styles/style_layers.h" // st::boxLabel
@@ -567,7 +569,7 @@ void SessionNavigation::showSettings(
}
void SessionNavigation::showSettings(const SectionShow &params) {
showSettings(Settings::Type::Main, params);
showSettings(Settings::Main::Id(), params);
}
void SessionNavigation::showPollResults(
@@ -667,7 +669,7 @@ void SessionController::suggestArchiveAndMute() {
tr::lng_suggest_hide_new_about(Ui::Text::RichLangValue),
st::boxLabel));
box->addButton(tr::lng_suggest_hide_new_to_settings(), [=] {
showSettings(Settings::Type::PrivacySecurity);
showSettings(Settings::PrivacySecurity::Id());
});
box->setCloseByOutsideClick(false);
box->boxClosing(