From 9532a2e3dab815cbd2299a56731f61064a4f239f Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 21 Nov 2024 10:01:31 +0400 Subject: [PATCH] Fix emoji status set cancel. Fixes #28674. Fixes https://bugs.telegram.org/c/45691. --- Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 {