Browse Source

Fix unneeded updating bubble pos on message sent

master
Eduard Kuzmenko 3 years ago
parent
commit
3b016583c2
  1. 7
      src/components/chat/bubbles.ts

7
src/components/chat/bubbles.ts

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

Loading…
Cancel
Save