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

Section dummies for new Settings.

This commit is contained in:
John Preston
2018-09-05 22:05:49 +03:00
parent 4f16ad6757
commit f0d092f126
34 changed files with 823 additions and 18 deletions

View File

@@ -8,7 +8,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_controller.h"
#include "window/main_window.h"
#include "old_settings/settings_widget.h"
#include "info/info_memento.h"
#include "info/info_controller.h"
#include "history/history.h"
#include "history/history_item.h"
#include "history/view/history_view_element.h"
@@ -473,6 +475,26 @@ void Navigation::showPeerInfo(
showPeerInfo(history->peer->id, params);
}
void Navigation::showSettings(
Settings::Type type,
const SectionShow &params) {
const auto self = App::self();
if (!self) {
// #TODO settings
App::wnd()->showSpecialLayer(
Box<OldSettings::Widget>(),
params.animated);
return;
}
showSection(
Info::Memento(Info::Settings::Tag{ self }, Info::Section(type)),
params);
}
void Navigation::showSettings(const SectionShow &params) {
showSettings(Settings::Type::Main, params);
}
void Controller::showSection(
SectionMemento &&memento,
const SectionShow &params) {