Telegram-iOS/submodules/InstantPageUI
isaac 071799368d InstantPage V2: fall back to 600x300 for zero-dimension map blocks
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>
2026-06-02 11:36:18 +02:00
..
Sources InstantPage V2: fall back to 600x300 for zero-dimension map blocks 2026-06-02 11:36:18 +02:00
BUILD Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-05-31 17:35:39 +02:00