mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-11 22:23:49 +00:00
Close community list with the swipe-back gesture
This commit is contained in:
@@ -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([=] {
|
||||
|
||||
Reference in New Issue
Block a user