Browse Source

Fix time overflow with grouped documents

master
morethanwords 4 years ago
parent
commit
56b1421137
  1. 4
      src/components/chat/bubbles.ts
  2. 2
      src/components/wrappers.ts

4
src/components/chat/bubbles.ts

@ -1818,7 +1818,7 @@ export default class ChatBubbles {
} }
const isOut = our && (!message.fwd_from || this.peerId != rootScope.myId); const isOut = our && (!message.fwd_from || this.peerId != rootScope.myId);
let nameContainer = bubbleContainer; let nameContainer: HTMLElement = bubbleContainer;
// media // media
if(messageMedia/* && messageMedia._ == 'messageMediaPhoto' */) { if(messageMedia/* && messageMedia._ == 'messageMediaPhoto' */) {
@ -2084,7 +2084,7 @@ export default class ChatBubbles {
nameContainer = newNameContainer; nameContainer = newNameContainer;
} }
const lastContainer = messageDiv.lastElementChild.querySelector('.document-size, .audio'); const lastContainer = messageDiv.lastElementChild.querySelector('.document-message, .document-size, .audio');
lastContainer && lastContainer.append(timeSpan.cloneNode(true)); lastContainer && lastContainer.append(timeSpan.cloneNode(true));
bubble.classList.remove('is-message-empty'); bubble.classList.remove('is-message-empty');

2
src/components/wrappers.ts

@ -1099,7 +1099,7 @@ export function wrapGroupedDocuments({albumMustBeRenderedFull, message, bubble,
chat: Chat, chat: Chat,
loadPromises?: Promise<any>[] loadPromises?: Promise<any>[]
}) { }) {
let nameContainer: HTMLDivElement; let nameContainer: HTMLElement;
const mids = albumMustBeRenderedFull ? chat.getMidsByMid(message.mid) : [message.mid]; const mids = albumMustBeRenderedFull ? chat.getMidsByMid(message.mid) : [message.mid];
/* if(isPending) { /* if(isPending) {
mids.reverse(); mids.reverse();

Loading…
Cancel
Save