|
|
@ -1479,13 +1479,14 @@ export default class ChatBubbles { |
|
|
|
|
|
|
|
|
|
|
|
const buyButton: HTMLElement = findUpClassName(target, 'is-buy'); |
|
|
|
const buyButton: HTMLElement = findUpClassName(target, 'is-buy'); |
|
|
|
if(buyButton) { |
|
|
|
if(buyButton) { |
|
|
|
|
|
|
|
cancelEvent(e); |
|
|
|
|
|
|
|
|
|
|
|
const message = await this.chat.getMessage(+bubble.dataset.mid); |
|
|
|
const message = await this.chat.getMessage(+bubble.dataset.mid); |
|
|
|
if(!message) { |
|
|
|
if(!message) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
new PopupPayment(message as Message.message); |
|
|
|
new PopupPayment(message as Message.message); |
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1636,13 +1637,6 @@ export default class ChatBubbles { |
|
|
|
|| (documentDiv && !documentDiv.querySelector('.preloader-container')) |
|
|
|
|| (documentDiv && !documentDiv.querySelector('.preloader-container')) |
|
|
|
|| target.classList.contains('canvas-thumbnail')) { |
|
|
|
|| target.classList.contains('canvas-thumbnail')) { |
|
|
|
const groupedItem = findUpClassName(target, 'album-item') || findUpClassName(target, 'document-container'); |
|
|
|
const groupedItem = findUpClassName(target, 'album-item') || findUpClassName(target, 'document-container'); |
|
|
|
const messageId = +(groupedItem || bubble).dataset.mid; |
|
|
|
|
|
|
|
const message = await this.chat.getMessage(messageId); |
|
|
|
|
|
|
|
if(!message) { |
|
|
|
|
|
|
|
this.log.warn('no message by messageId:', messageId); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const preloader = (groupedItem || bubble).querySelector<HTMLElement>('.preloader-container'); |
|
|
|
const preloader = (groupedItem || bubble).querySelector<HTMLElement>('.preloader-container'); |
|
|
|
if(preloader) { |
|
|
|
if(preloader) { |
|
|
|
simulateClickEvent(preloader); |
|
|
|
simulateClickEvent(preloader); |
|
|
@ -1650,6 +1644,14 @@ export default class ChatBubbles { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancelEvent(e); |
|
|
|
|
|
|
|
const messageId = +(groupedItem || bubble).dataset.mid; |
|
|
|
|
|
|
|
const message = await this.chat.getMessage(messageId); |
|
|
|
|
|
|
|
if(!message) { |
|
|
|
|
|
|
|
this.log.warn('no message by messageId:', messageId); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const SINGLE_MEDIA_CLASSNAME = 'webpage'; |
|
|
|
const SINGLE_MEDIA_CLASSNAME = 'webpage'; |
|
|
|
const isSingleMedia = bubble.classList.contains(SINGLE_MEDIA_CLASSNAME); |
|
|
|
const isSingleMedia = bubble.classList.contains(SINGLE_MEDIA_CLASSNAME); |
|
|
|
|
|
|
|
|
|
|
@ -1736,7 +1738,6 @@ export default class ChatBubbles { |
|
|
|
}) |
|
|
|
}) |
|
|
|
.openMedia(message, targets[idx].element, 0, true, targets.slice(0, idx), targets.slice(idx + 1)); |
|
|
|
.openMedia(message, targets[idx].element, 0, true, targets.slice(0, idx), targets.slice(idx + 1)); |
|
|
|
|
|
|
|
|
|
|
|
cancelEvent(e); |
|
|
|
|
|
|
|
//appMediaViewer.openMedia(message, target as HTMLImageElement);
|
|
|
|
//appMediaViewer.openMedia(message, target as HTMLImageElement);
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|