2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Improve recipients selection in business features.

This commit is contained in:
John Preston
2024-03-07 17:02:32 +04:00
parent e3f6c189a7
commit 00dcf11691
14 changed files with 109 additions and 49 deletions

View File

@@ -410,8 +410,10 @@ void WrapWidget::setupTopBarMenuToggle() {
}
void WrapWidget::checkBeforeClose(Fn<void()> close) {
_controller->parentController()->hideLayer();
close();
_content->checkBeforeClose(crl::guard(this, [=] {
_controller->parentController()->hideLayer();
close();
}));
}
void WrapWidget::addTopBarMenuButton() {
@@ -438,7 +440,7 @@ void WrapWidget::addTopBarMenuButton() {
}
bool WrapWidget::closeByOutsideClick() const {
return true;
return _content->closeByOutsideClick();
}
void WrapWidget::addProfileCallsButton() {
@@ -872,8 +874,12 @@ void WrapWidget::keyPressEvent(QKeyEvent *e) {
if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Back) {
if (hasStackHistory() || wrap() != Wrap::Layer) {
checkBeforeClose([=] { _controller->showBackFromStack(); });
return;
} else {
checkBeforeClose([=] {
_controller->parentController()->hideSpecialLayer();
});
}
return;
}
SectionWidget::keyPressEvent(e);
}