mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Allowed swipe-to-back in side info section.
This commit is contained in:
parent
6bed3f3f09
commit
ad64e068db
1 changed files with 18 additions and 7 deletions
|
@ -404,13 +404,24 @@ void ContentWidget::setupSwipeReply() {
|
||||||
_swipeBackData = {};
|
_swipeBackData = {};
|
||||||
}
|
}
|
||||||
}, [=](int, Qt::LayoutDirection direction) {
|
}, [=](int, Qt::LayoutDirection direction) {
|
||||||
if (_controller->wrap() != Wrap::Narrow
|
const auto can = [&] {
|
||||||
|| direction != Qt::RightToLeft) {
|
using Type = Section::Type;
|
||||||
return HistoryView::SwipeHandlerFinishData();
|
if (direction != Qt::RightToLeft) {
|
||||||
}
|
return false;
|
||||||
return HistoryView::DefaultSwipeBackHandlerFinishData([=] {
|
} else if (_controller->wrap() == Wrap::Side) {
|
||||||
_controller->showBackFromStack();
|
return (_controller->section().type() != Type::Profile);
|
||||||
});
|
} else if (_controller->wrap() == Wrap::Narrow) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}();
|
||||||
|
|
||||||
|
return !can
|
||||||
|
? HistoryView::SwipeHandlerFinishData()
|
||||||
|
: HistoryView::DefaultSwipeBackHandlerFinishData([=] {
|
||||||
|
_controller->showBackFromStack();
|
||||||
|
});
|
||||||
}, nullptr);
|
}, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue