Move manage filters to a Settings section.

This commit is contained in:
John Preston
2020-03-24 12:58:47 +04:00
parent 568325f201
commit e8bf5bb5ce
14 changed files with 238 additions and 191 deletions
@@ -10,7 +10,6 @@ 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,20 +43,14 @@ Widget::Widget(
: ContentWidget(parent, controller)
, _self(controller->key().settingsSelf())
, _type(controller->section().settingsType())
, _inner(setInnerWidget(::Settings::CreateSection(
_type,
this,
controller->parentController())))
, _manageFilters(
std::make_unique<ManageFiltersPrepare>(
controller->parentController())) {
, _inner(setInnerWidget(
::Settings::CreateSection(
_type,
this,
controller->parentController()))) {
_inner->sectionShowOther(
) | rpl::start_with_next([=](Type type) {
if (type == Type::Folders) {
_manageFilters->showBox();
} else {
controller->showSettings(type);
}
controller->showSettings(type);
}, _inner->lifetime());
controller->setCanSaveChanges(_inner->sectionCanSaveChanges());