Fix original message time

Fix animated emoji sticker play after click and blur
This commit is contained in:
Eduard Kuzmenko 2020-11-18 22:07:31 +02:00
parent 5c0ea0208e
commit 28c9861bdf
3 changed files with 9 additions and 4 deletions

View File

@ -503,7 +503,7 @@ export class ChatInput {
};
}
this.replyElements.cancelBtn.addEventListener('click', (e) => {
const onCancelHelper = (e: Event) => {
cancelEvent(e);
if(this.willSendWebPage) {
@ -521,10 +521,14 @@ export class ChatInput {
this.clearHelper();
this.updateSendBtn();
});
};
this.replyElements.cancelBtn.addEventListener(isTouchSupported ? 'touchend' : 'click', onCancelHelper);
let d = false;
this.replyElements.container.addEventListener('click', (e) => {
this.replyElements.container.addEventListener(isTouchSupported ? 'touchend' : 'click', (e) => {
cancelEvent(e);
if(!findUpClassName(e.target, 'reply-wrapper')) return;
if(this.helperType == 'forward') {
if(d) return;

View File

@ -40,7 +40,7 @@ export namespace MessageRender {
}
const title = getFullDate(date)
+ (message.edit_date ? `\nEdited: ${getFullDate(new Date(message.edit_date * 1000))}` : '');
+ (message.edit_date ? `\nEdited: ${getFullDate(new Date(message.edit_date * 1000))}` : '')
+ (message.fwd_from ? `\nOriginal: ${getFullDate(new Date(message.fwd_from.date * 1000))}` : '');
const timeSpan = document.createElement('span');

View File

@ -674,6 +674,7 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
let animation = LottieLoader.getAnimation(div);
if(animation.paused) {
animation.autoplay = true;
animation.restart();
}
});