diff --git a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp index df1111869..52fda97bf 100644 --- a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp +++ b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp @@ -639,12 +639,13 @@ void ConfirmEmojiStatusBox( done(true); }); box->addButton(tr::lng_cancel(), [=] { - const auto was = *set; box->closeBox(); - if (!was) { + }); + box->boxClosing() | rpl::start_with_next([=] { + if (!*set) { done(false); } - }); + }, box->lifetime()); } class BotAction final : public Ui::Menu::ItemBase {