mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
When a pinToEdgeWithInset item is taller than half of the visible area (visibleSize.height - insets.top - insets.bottom), cap its visible portion at halfArea. The remaining height extends past visibleSize - insets.bottom into the bottom-inset region (occluded by overlay UI like the chat input panel). A new private helper `pinToEdgeBottomExtension(forPinnedHeight:)` returns max(0, pinnedHeight - halfArea). Three sites consume it: - calculatePinToEdgeTopInset caps the pinned item's contribution to totalAboveAndPinned via `pinnedHeight - extension`. - replayOperations isPinToEdgeTarget anchors the pinned item's apparent maxY at visibleSize - insets.bottom + extension. - isStrictlyScrolledToPinToEdgeItem matches the new anchor. Both isPinToEdgeTarget and isStrictlyScrolledToPinToEdgeItem fire when either calculatePinToEdgeTopInset() > 0 OR extension > 0, so the cap also applies when items above the pinned item overflow the visible area (in which case calculatePinToEdgeTopInset returns 0 but extension is still positive). When the pinned item fits within halfArea, extension == 0 and behavior is identical to before this change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| superpowers | ||
| ui-testing.md | ||