mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Added support of close prevention for search messages in dialogs.
This commit is contained in:
parent
1f4ea8414b
commit
307894415f
1 changed files with 24 additions and 19 deletions
|
@ -4386,6 +4386,7 @@ void HistoryWidget::searchInChat() {
|
||||||
if (controller()->isPrimary()) {
|
if (controller()->isPrimary()) {
|
||||||
controller()->content()->searchInChat(_history);
|
controller()->content()->searchInChat(_history);
|
||||||
} else {
|
} else {
|
||||||
|
const auto search = [=] {
|
||||||
const auto update = [=] {
|
const auto update = [=] {
|
||||||
updateControlsVisibility();
|
updateControlsVisibility();
|
||||||
updateBotKeyboard();
|
updateBotKeyboard();
|
||||||
|
@ -4409,6 +4410,10 @@ void HistoryWidget::searchInChat() {
|
||||||
update();
|
update();
|
||||||
setInnerFocus();
|
setInnerFocus();
|
||||||
}, _composeSearch->lifetime());
|
}, _composeSearch->lifetime());
|
||||||
|
};
|
||||||
|
if (!preventsClose(search)) {
|
||||||
|
search();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue