Browse Source

Fix reading status when sending messages to bot

master
Eduard Kuzmenko 4 years ago
parent
commit
963b71d020
  1. 8
      src/components/chat/bubbles.ts

8
src/components/chat/bubbles.ts

@ -310,8 +310,10 @@ export default class ChatBubbles { @@ -310,8 +310,10 @@ export default class ChatBubbles {
//getHeavyAnimationPromise().then(() => {
fastRaf(() => {
bubble.classList.remove('is-sending');
bubble.classList.add(this.peerId === rootScope.myId && this.chat.type !== 'scheduled' ? 'is-read' : 'is-sent');
if(bubble.classList.contains('is-sending')) {
bubble.classList.remove('is-sending');
bubble.classList.add(this.peerId === rootScope.myId && this.chat.type !== 'scheduled' ? 'is-read' : 'is-sent');
}
});
//});
@ -1222,7 +1224,7 @@ export default class ChatBubbles { @@ -1222,7 +1224,7 @@ export default class ChatBubbles {
if(msgId > 0 && msgId <= maxId) {
const bubble = this.bubbles[msgId];
if(bubble) {
bubble.classList.remove('is-sent');
bubble.classList.remove('is-sent', 'is-sending'); // is-sending can be when there are bulk of updates (e.g. sending command to Stickers bot)
bubble.classList.add('is-read');
}

Loading…
Cancel
Save