mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix possible crash in delayed typing updates.
This commit is contained in:
parent
0984e631fa
commit
1eef94e8d9
1 changed files with 6 additions and 5 deletions
|
@ -1411,15 +1411,16 @@ bool HistoryWidget::updateStickersByEmoji() {
|
|||
}
|
||||
|
||||
void HistoryWidget::fieldChanged() {
|
||||
const auto typing = (_history
|
||||
&& !_inlineBot
|
||||
&& !_editMsgId
|
||||
&& (_textUpdateEvents & TextUpdateEvent::SendTyping));
|
||||
const auto updateTyping = (_textUpdateEvents & TextUpdateEvent::SendTyping);
|
||||
|
||||
InvokeQueued(this, [=] {
|
||||
updateInlineBotQuery();
|
||||
const auto choosingSticker = updateStickersByEmoji();
|
||||
if (!choosingSticker && typing) {
|
||||
if (_history
|
||||
&& !_inlineBot
|
||||
&& !_editMsgId
|
||||
&& !choosingSticker
|
||||
&& updateTyping) {
|
||||
session().sendProgressManager().update(
|
||||
_history,
|
||||
Api::SendProgressType::Typing);
|
||||
|
|
Loading…
Add table
Reference in a new issue