mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Fix cancel of bot app confirm.
This commit is contained in:
parent
813d0501da
commit
a422aec99a
1 changed files with 5 additions and 1 deletions
|
@ -787,6 +787,10 @@ void WebViewInstance::confirmAppOpen(
|
|||
done((*allowed) && (*allowed)->checked());
|
||||
close();
|
||||
};
|
||||
const auto cancelled = [=](Fn<void()> close) {
|
||||
botClose();
|
||||
close();
|
||||
};
|
||||
Ui::ConfirmBox(box, {
|
||||
tr::lng_allow_bot_webview(
|
||||
tr::now,
|
||||
|
@ -794,7 +798,7 @@ void WebViewInstance::confirmAppOpen(
|
|||
Ui::Text::Bold(_bot->name()),
|
||||
Ui::Text::RichLangValue),
|
||||
crl::guard(this, callback),
|
||||
crl::guard(this, [=] { botClose(); }),
|
||||
crl::guard(this, cancelled),
|
||||
});
|
||||
if (writeAccess) {
|
||||
(*allowed) = box->addRow(
|
||||
|
|
Loading…
Add table
Reference in a new issue