mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
AI/server-sent .map blocks can arrive with dimensions == 0x0 (the wire w/h are required Int32, but the sender may put 0; our parse and both serializers preserve whatever arrives). A zero naturalSize.height hit instantPageV2MediaFrame's else branch and returned a height-0 frame: the map collapsed to no space, the caption slid up into it, and the V1 node's pin floated over the caption. A zero-sized MapSnapshotMediaResource would also make MKMapSnapshotter render nothing. Substitute PixelDimensions(600, 300) (2:1) whenever width <= 0 || height <= 0, feeding effectiveDimensions to BOTH the layout naturalSize AND the InstantPageMapAttribute so the snapshot resource is non-zero and actually renders. Scoped to the V2 .map arm; V1 (real web articles) always carries real dimensions and never trips this. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Sources | ||
| BUILD | ||