Close community list with the swipe-back gesture

This commit is contained in:
John Preston
2026-07-09 23:17:21 +04:00
parent 83f5025c9a
commit 69208ae951
@@ -901,6 +901,19 @@ void Widget::setupSwipeBack() {
}
});
}
if (controller()->openedCommunity().current()) {
if (!isRightToLeft) {
return Ui::Controls::SwipeHandlerFinishData();
}
return Ui::Controls::DefaultSwipeBackHandlerFinishData([=] {
_swipeBackData = {};
if (controller()->openedCommunity().current()) {
if (!controller()->windowId().community()) {
controller()->closeCommunity();
}
}
});
}
if (isRightToLeft && isMainList()) {
_swipeBackIconMirrored = true;
return Ui::Controls::DefaultSwipeBackHandlerFinishData([=] {