mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Add folders menu to Settings.
This commit is contained in:
@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "info/info_memento.h"
|
||||
#include "info/info_controller.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "boxes/filters/manage_filters_box.h"
|
||||
#include "ui/ui_utility.h"
|
||||
|
||||
namespace Info {
|
||||
@@ -44,17 +45,26 @@ Widget::Widget(
|
||||
, _self(controller->key().settingsSelf())
|
||||
, _type(controller->section().settingsType())
|
||||
, _inner(setInnerWidget(::Settings::CreateSection(
|
||||
_type,
|
||||
this,
|
||||
controller->parentController()))) {
|
||||
_type,
|
||||
this,
|
||||
controller->parentController())))
|
||||
, _manageFilters(
|
||||
std::make_unique<ManageFiltersPrepare>(
|
||||
controller->parentController())) {
|
||||
_inner->sectionShowOther(
|
||||
) | rpl::start_with_next([=](Type type) {
|
||||
controller->showSettings(type);
|
||||
if (type == Type::Folders) {
|
||||
_manageFilters->showBox();
|
||||
} else {
|
||||
controller->showSettings(type);
|
||||
}
|
||||
}, _inner->lifetime());
|
||||
|
||||
controller->setCanSaveChanges(_inner->sectionCanSaveChanges());
|
||||
}
|
||||
|
||||
Widget::~Widget() = default;
|
||||
|
||||
not_null<UserData*> Widget::self() const {
|
||||
return _self;
|
||||
}
|
||||
|
Reference in New Issue
Block a user