Fix freezing chats when were rendering wrong thumb
This commit is contained in:
parent
475f0027fc
commit
10d97d9969
@ -271,9 +271,9 @@ export class AppDownloadManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getCacheContext(media: MyPhoto | MyDocument, thumbSize: string = 'full'): ThumbCache {
|
public getCacheContext(media: MyPhoto | MyDocument, thumbSize: string = 'full'): ThumbCache {
|
||||||
if(media._ === 'photo' && thumbSize !== 'i') {
|
/* if(media._ === 'photo' && thumbSize !== 'i') {
|
||||||
thumbSize = 'full';
|
thumbSize = 'full';
|
||||||
}
|
} */
|
||||||
|
|
||||||
const cache = this.thumbsCache[media._][media.id] ?? (this.thumbsCache[media._][media.id] = {});
|
const cache = this.thumbsCache[media._][media.id] ?? (this.thumbsCache[media._][media.id] = {});
|
||||||
return cache[thumbSize] ?? (cache[thumbSize] = {downloaded: 0, url: ''});
|
return cache[thumbSize] ?? (cache[thumbSize] = {downloaded: 0, url: ''});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user