Fix reactions strip glitch in story reply sending.

This commit is contained in:
John Preston 2023-07-25 20:08:26 +04:00
parent 6098e5ac33
commit a85f33f7d3

View file

@ -186,8 +186,8 @@ void ReplyArea::send(
session().api().sendMessage(std::move(message)); session().api().sendMessage(std::move(message));
_controls->clear();
finishSending(skipToast); finishSending(skipToast);
_controls->clear();
} }
void ReplyArea::sendVoice(VoiceToSend &&data) { void ReplyArea::sendVoice(VoiceToSend &&data) {
@ -276,8 +276,6 @@ void ReplyArea::sendInlineResult(
action.generateLocal = true; action.generateLocal = true;
session().api().sendInlineResult(bot, result, action, localMessageId); session().api().sendInlineResult(bot, result, action, localMessageId);
_controls->clear();
auto &bots = cRefRecentInlineBots(); auto &bots = cRefRecentInlineBots();
const auto index = bots.indexOf(bot); const auto index = bots.indexOf(bot);
if (index) { if (index) {
@ -290,11 +288,12 @@ void ReplyArea::sendInlineResult(
bot->session().local().writeRecentHashtagsAndBots(); bot->session().local().writeRecentHashtagsAndBots();
} }
finishSending(); finishSending();
_controls->clear();
} }
void ReplyArea::finishSending(bool skipToast) { void ReplyArea::finishSending(bool skipToast) {
_controls->hidePanelsAnimated(); _controls->hidePanelsAnimated();
_controller->wrap()->setFocus(); _controller->unfocusReply();
if (!skipToast) { if (!skipToast) {
_controller->uiShow()->showToast( _controller->uiShow()->showToast(
tr::lng_stories_reply_sent(tr::now)); tr::lng_stories_reply_sent(tr::now));