Fix freezing chats when were rendering wrong thumb

This commit is contained in:
Eduard Kuzmenko 2021-05-16 05:23:28 +04:00
parent 475f0027fc
commit 10d97d9969

View File

@ -271,9 +271,9 @@ export class AppDownloadManager {
}
public getCacheContext(media: MyPhoto | MyDocument, thumbSize: string = 'full'): ThumbCache {
if(media._ === 'photo' && thumbSize !== 'i') {
/* if(media._ === 'photo' && thumbSize !== 'i') {
thumbSize = 'full';
}
} */
const cache = this.thumbsCache[media._][media.id] ?? (this.thumbsCache[media._][media.id] = {});
return cache[thumbSize] ?? (cache[thumbSize] = {downloaded: 0, url: ''});