Added to settings support of showing back section from stack.

This commit is contained in:
23rd 2022-05-04 18:05:10 +03:00
parent de3b30ed7d
commit 549d7c77e5
2 changed files with 8 additions and 0 deletions

View File

@ -54,6 +54,11 @@ Widget::Widget(
controller->showSettings(type);
}, _inner->lifetime());
_inner->sectionShowBack(
) | rpl::start_with_next([=] {
controller->showBackFromStack();
}, _inner->lifetime());
if (_pinnedToTop) {
_inner->widthValue(
) | rpl::start_with_next([=](int w) {

View File

@ -78,6 +78,9 @@ public:
[[nodiscard]] virtual rpl::producer<Type> sectionShowOther() {
return nullptr;
}
[[nodiscard]] virtual rpl::producer<> sectionShowBack() {
return nullptr;
}
[[nodiscard]] virtual rpl::producer<QString> title() = 0;
virtual void sectionSaveChanges(FnMut<void()> done) {
done();