Fix emoji status set cancel.

Fixes #28674.
Fixes https://bugs.telegram.org/c/45691.
This commit is contained in:
John Preston 2024-11-21 10:01:31 +04:00
parent e70f50d837
commit 9532a2e3da

View file

@ -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 {