diff --git a/src/components/popupAvatar.ts b/src/components/popupAvatar.ts index 84b3322f..3c56934b 100644 --- a/src/components/popupAvatar.ts +++ b/src/components/popupAvatar.ts @@ -1,4 +1,5 @@ import resizeableImage from "../lib/cropper"; +import appDownloadManager from "../lib/appManagers/appDownloadManager"; export class PopupAvatar { private container = document.getElementById('popup-avatar'); @@ -76,11 +77,7 @@ export class PopupAvatar { private resolve() { this.onCrop(() => { - //return apiFileManager.uploadFile(this.blob); - return fetch('/upload', { - method: 'POST', - body: this.blob - }).then(res => res.json()); + return appDownloadManager.upload(this.blob); }); } diff --git a/src/lib/appManagers/appImManager.ts b/src/lib/appManagers/appImManager.ts index 02601f13..f8db0d04 100644 --- a/src/lib/appManagers/appImManager.ts +++ b/src/lib/appManagers/appImManager.ts @@ -2610,7 +2610,7 @@ export class AppImManager { } else { if(message.reply_to_mid) { let originalMessage = appMessagesManager.getMessage(message.reply_to_mid); - let originalPeerTitle = appPeersManager.getPeerTitle(originalMessage.fromID, true) || ''; + let originalPeerTitle = appPeersManager.getPeerTitle(originalMessage.fromID || originalMessage.fwdFromID, true) || ''; /////////this.log('message to render reply', originalMessage, originalPeerTitle, bubble, message); diff --git a/src/lib/mediaPlayer.ts b/src/lib/mediaPlayer.ts index 3c7e092e..adcca891 100644 --- a/src/lib/mediaPlayer.ts +++ b/src/lib/mediaPlayer.ts @@ -1,4 +1,5 @@ import { cancelEvent, whichChild } from "./utils"; +import { touchSupport } from "./config"; export class ProgressLine { public container: HTMLDivElement; @@ -369,7 +370,9 @@ export default class VideoPlayer { }); video.addEventListener('click', () => { - this.togglePlay(); + if(!touchSupport) { + this.togglePlay(); + } }); /* player.addEventListener('click', (e) => {