mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-23 08:46:55 +00:00
Fix possible crash in delayed typing updates.
This commit is contained in:
parent
0984e631fa
commit
1eef94e8d9
@ -1411,15 +1411,16 @@ bool HistoryWidget::updateStickersByEmoji() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::fieldChanged() {
|
void HistoryWidget::fieldChanged() {
|
||||||
const auto typing = (_history
|
const auto updateTyping = (_textUpdateEvents & TextUpdateEvent::SendTyping);
|
||||||
&& !_inlineBot
|
|
||||||
&& !_editMsgId
|
|
||||||
&& (_textUpdateEvents & TextUpdateEvent::SendTyping));
|
|
||||||
|
|
||||||
InvokeQueued(this, [=] {
|
InvokeQueued(this, [=] {
|
||||||
updateInlineBotQuery();
|
updateInlineBotQuery();
|
||||||
const auto choosingSticker = updateStickersByEmoji();
|
const auto choosingSticker = updateStickersByEmoji();
|
||||||
if (!choosingSticker && typing) {
|
if (_history
|
||||||
|
&& !_inlineBot
|
||||||
|
&& !_editMsgId
|
||||||
|
&& !choosingSticker
|
||||||
|
&& updateTyping) {
|
||||||
session().sendProgressManager().update(
|
session().sendProgressManager().update(
|
||||||
_history,
|
_history,
|
||||||
Api::SendProgressType::Typing);
|
Api::SendProgressType::Typing);
|
||||||
|
Loading…
Reference in New Issue
Block a user