Added support of close prevention for search messages in dialogs.

This commit is contained in:
23rd 2022-03-23 11:46:30 +03:00 committed by John Preston
parent 1f4ea8414b
commit 307894415f

View file

@ -4386,6 +4386,7 @@ void HistoryWidget::searchInChat() {
if (controller()->isPrimary()) {
controller()->content()->searchInChat(_history);
} else {
const auto search = [=] {
const auto update = [=] {
updateControlsVisibility();
updateBotKeyboard();
@ -4409,6 +4410,10 @@ void HistoryWidget::searchInChat() {
update();
setInnerFocus();
}, _composeSearch->lifetime());
};
if (!preventsClose(search)) {
search();
}
}
}