Fix unneeded updating bubble pos on message sent

This commit is contained in:
Eduard Kuzmenko 2021-03-10 19:02:26 +04:00
parent 65cfebb5ea
commit 3b016583c2

View File

@ -46,6 +46,7 @@ import { deferredPromise } from "../../helpers/cancellablePromise";
import RepliesElement from "./replies";
import DEBUG from "../../config/debug";
import { SliceEnd } from "../../helpers/slicedArray";
import serverTimeManager from "../../lib/mtproto/serverTimeManager";
const USE_MEDIA_TAILS = false;
const IGNORE_ACTIONS = ['messageActionHistoryClear'];
@ -153,7 +154,11 @@ export default class ChatBubbles {
if(!bubble) return;
const message = this.chat.getMessage(mid);
//bubble.remove();
if(+bubble.dataset.timestamp >= (message.date - serverTimeManager.serverTimeOffset - 1)) {
return;
}
this.setBubblePosition(bubble, message, false);
//this.log('history_update', this.bubbles[mid], mid, message);