mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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());
|
done((*allowed) && (*allowed)->checked());
|
||||||
close();
|
close();
|
||||||
};
|
};
|
||||||
|
const auto cancelled = [=](Fn<void()> close) {
|
||||||
|
botClose();
|
||||||
|
close();
|
||||||
|
};
|
||||||
Ui::ConfirmBox(box, {
|
Ui::ConfirmBox(box, {
|
||||||
tr::lng_allow_bot_webview(
|
tr::lng_allow_bot_webview(
|
||||||
tr::now,
|
tr::now,
|
||||||
|
@ -794,7 +798,7 @@ void WebViewInstance::confirmAppOpen(
|
||||||
Ui::Text::Bold(_bot->name()),
|
Ui::Text::Bold(_bot->name()),
|
||||||
Ui::Text::RichLangValue),
|
Ui::Text::RichLangValue),
|
||||||
crl::guard(this, callback),
|
crl::guard(this, callback),
|
||||||
crl::guard(this, [=] { botClose(); }),
|
crl::guard(this, cancelled),
|
||||||
});
|
});
|
||||||
if (writeAccess) {
|
if (writeAccess) {
|
||||||
(*allowed) = box->addRow(
|
(*allowed) = box->addRow(
|
||||||
|
|
Loading…
Add table
Reference in a new issue