diff --git a/src/components/wrappers/document.ts b/src/components/wrappers/document.ts index e1e6cf5f..3b184315 100644 --- a/src/components/wrappers/document.ts +++ b/src/components/wrappers/document.ts @@ -121,7 +121,7 @@ export default async function wrapDocument({message, withTime, fontWeight, voice size: choosePhotoSize(doc, 54, 54, true), managers }); - console.log('was wrapping photo', performance.now() - perf); + // console.log('was wrapping photo', performance.now() - perf); icoDiv.style.width = icoDiv.style.height = ''; if(wrapped.images.thumb) imgs.push(wrapped.images.thumb); if(wrapped.images.full) imgs.push(wrapped.images.full); diff --git a/src/lib/appManagers/appDialogsManager.ts b/src/lib/appManagers/appDialogsManager.ts index 054c910e..8ed37adf 100644 --- a/src/lib/appManagers/appDialogsManager.ts +++ b/src/lib/appManagers/appDialogsManager.ts @@ -1965,7 +1965,7 @@ export class AppDialogsManager { peerId, }); - // this.setLastMessage(ret.dialog, message, ret.dom, query); + this.setLastMessage({_: 'dialog', peerId} as any, message, ret.dom, query); if(message.peerId !== peerId) { ret.dom.listEl.dataset.peerId = '' + message.peerId; @@ -2060,7 +2060,7 @@ export class AppDialogsManager { const li = document.createElement(DIALOG_LIST_ELEMENT_TAG); li.classList.add('chatlist-chat'); - (li as HTMLAnchorElement).href = '#' + peerId; + if(!autonomous) (li as HTMLAnchorElement).href = '#' + peerId; if(rippleEnabled) { ripple(li); } diff --git a/src/lib/appManagers/appDownloadManager.ts b/src/lib/appManagers/appDownloadManager.ts index 5113a14c..3581c1dc 100644 --- a/src/lib/appManagers/appDownloadManager.ts +++ b/src/lib/appManagers/appDownloadManager.ts @@ -159,6 +159,10 @@ export class AppDownloadManager { public downloadMedia(options: DownloadMediaOptions, type: DownloadType = 'blob'): DownloadBlob { const {downloadOptions, fileName} = getDownloadMediaDetails(options); + if(fileName === 'document_5307720352468571676') { + debugger; + } + return this.d(fileName, () => { const cb = type === 'url' ? this.managers.apiFileManager.downloadMediaURL : (type === 'void' ? this.managers.apiFileManager.downloadMediaVoid : this.managers.apiFileManager.downloadMedia); return cb(options); diff --git a/src/lib/appManagers/appStickersManager.ts b/src/lib/appManagers/appStickersManager.ts index 882b223f..1bfaa29f 100644 --- a/src/lib/appManagers/appStickersManager.ts +++ b/src/lib/appManagers/appStickersManager.ts @@ -271,8 +271,8 @@ export class AppStickersManager extends AppManager { ]).then(([doc, a]) => { return { doc: doc, - animation: a.doc, - sound: a.sound + animation: a?.doc, + sound: a?.sound }; }); } diff --git a/src/lib/mtproto/apiFileManager.ts b/src/lib/mtproto/apiFileManager.ts index b7c4727b..71ad8e43 100644 --- a/src/lib/mtproto/apiFileManager.ts +++ b/src/lib/mtproto/apiFileManager.ts @@ -613,7 +613,7 @@ export class ApiFileManager extends AppManager { if(!promise) { promise = this.download(downloadOptions); - if(isDocument) { + if(isDocument && !thumb) { this.rootScope.dispatchEvent('document_downloading', media.id); promise.catch(noop).finally(() => { this.rootScope.dispatchEvent('document_downloaded', media.id);