Fix displaying private search results
Fix autodownloading files Fix reporting messages
This commit is contained in:
parent
f23d953c5a
commit
2aa743b8cc
@ -121,7 +121,7 @@ export default async function wrapDocument({message, withTime, fontWeight, voice
|
|||||||
size: choosePhotoSize(doc, 54, 54, true),
|
size: choosePhotoSize(doc, 54, 54, true),
|
||||||
managers
|
managers
|
||||||
});
|
});
|
||||||
console.log('was wrapping photo', performance.now() - perf);
|
// console.log('was wrapping photo', performance.now() - perf);
|
||||||
icoDiv.style.width = icoDiv.style.height = '';
|
icoDiv.style.width = icoDiv.style.height = '';
|
||||||
if(wrapped.images.thumb) imgs.push(wrapped.images.thumb);
|
if(wrapped.images.thumb) imgs.push(wrapped.images.thumb);
|
||||||
if(wrapped.images.full) imgs.push(wrapped.images.full);
|
if(wrapped.images.full) imgs.push(wrapped.images.full);
|
||||||
|
@ -1965,7 +1965,7 @@ export class AppDialogsManager {
|
|||||||
peerId,
|
peerId,
|
||||||
});
|
});
|
||||||
|
|
||||||
// this.setLastMessage(ret.dialog, message, ret.dom, query);
|
this.setLastMessage({_: 'dialog', peerId} as any, message, ret.dom, query);
|
||||||
|
|
||||||
if(message.peerId !== peerId) {
|
if(message.peerId !== peerId) {
|
||||||
ret.dom.listEl.dataset.peerId = '' + message.peerId;
|
ret.dom.listEl.dataset.peerId = '' + message.peerId;
|
||||||
@ -2060,7 +2060,7 @@ export class AppDialogsManager {
|
|||||||
|
|
||||||
const li = document.createElement(DIALOG_LIST_ELEMENT_TAG);
|
const li = document.createElement(DIALOG_LIST_ELEMENT_TAG);
|
||||||
li.classList.add('chatlist-chat');
|
li.classList.add('chatlist-chat');
|
||||||
(li as HTMLAnchorElement).href = '#' + peerId;
|
if(!autonomous) (li as HTMLAnchorElement).href = '#' + peerId;
|
||||||
if(rippleEnabled) {
|
if(rippleEnabled) {
|
||||||
ripple(li);
|
ripple(li);
|
||||||
}
|
}
|
||||||
|
@ -159,6 +159,10 @@ export class AppDownloadManager {
|
|||||||
|
|
||||||
public downloadMedia(options: DownloadMediaOptions, type: DownloadType = 'blob'): DownloadBlob {
|
public downloadMedia(options: DownloadMediaOptions, type: DownloadType = 'blob'): DownloadBlob {
|
||||||
const {downloadOptions, fileName} = getDownloadMediaDetails(options);
|
const {downloadOptions, fileName} = getDownloadMediaDetails(options);
|
||||||
|
if(fileName === 'document_5307720352468571676') {
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
|
|
||||||
return this.d(fileName, () => {
|
return this.d(fileName, () => {
|
||||||
const cb = type === 'url' ? this.managers.apiFileManager.downloadMediaURL : (type === 'void' ? this.managers.apiFileManager.downloadMediaVoid : this.managers.apiFileManager.downloadMedia);
|
const cb = type === 'url' ? this.managers.apiFileManager.downloadMediaURL : (type === 'void' ? this.managers.apiFileManager.downloadMediaVoid : this.managers.apiFileManager.downloadMedia);
|
||||||
return cb(options);
|
return cb(options);
|
||||||
|
@ -271,8 +271,8 @@ export class AppStickersManager extends AppManager {
|
|||||||
]).then(([doc, a]) => {
|
]).then(([doc, a]) => {
|
||||||
return {
|
return {
|
||||||
doc: doc,
|
doc: doc,
|
||||||
animation: a.doc,
|
animation: a?.doc,
|
||||||
sound: a.sound
|
sound: a?.sound
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -613,7 +613,7 @@ export class ApiFileManager extends AppManager {
|
|||||||
if(!promise) {
|
if(!promise) {
|
||||||
promise = this.download(downloadOptions);
|
promise = this.download(downloadOptions);
|
||||||
|
|
||||||
if(isDocument) {
|
if(isDocument && !thumb) {
|
||||||
this.rootScope.dispatchEvent('document_downloading', media.id);
|
this.rootScope.dispatchEvent('document_downloading', media.id);
|
||||||
promise.catch(noop).finally(() => {
|
promise.catch(noop).finally(() => {
|
||||||
this.rootScope.dispatchEvent('document_downloaded', media.id);
|
this.rootScope.dispatchEvent('document_downloaded', media.id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user