fix: crisp full media for large stickers/custom emoji - #702
Conversation
Avoid forcing photoSize thumbs for large animated stickers and custom emoji when `static: true` is set at a large CSS size, so fullscreen and pack previews stay crisp. Tiny list slots still use thumbs. Fixes morethanwords#701 Co-authored-by: Cursor <cursoragent@cursor.com>
morethanwords
left a comment
There was a problem hiding this comment.
Thanks for looking into this. I do not think this patch currently fixes #701 in Web K.
The large preview path in stickerViewer.ts does not pass static: true, so asStatic is already false there and this new condition does not change its rendering. The issue itself reports Telegram Desktop on Windows; before changing the shared wrapper, please provide a Web K reproduction and identify the call site that is actually stuck on a thumbnail.
This global override also breaks the Chromium/WebM leak fallback in this same function. That fallback deliberately calls wrapSticker({...options, static: true}) to replace a stuck video with an image. At sizes >= 64 this block changes it back to non-static and creates another video, which can re-enter the same leak path instead of providing a stable fallback.
Please make full-media preference explicit at the confirmed call site (for example, a preferFullMedia option), preserve the forced-static WebM fallback, and add regression coverage for both paths.
Summary
CSS size >= 64) instead of upscaling low-resphotoSizethumbs when callers passstatic: true.Fixes #701
Tracking: HyperlinksSpace/HyperlinksSpaceProgram#92
Test plan
Made with Cursor