Fix player dismiss gesture stuck after panel dismiss with comments expanded

Reset isCommentsExpanded and commentsFrame on the NavigationCoordinator
directly when the portrait panel is dismissed, since PortraitDetailsPanel
owns its own @State that doesn't sync back through .onChange during dismiss.
Also track comments overlay frame via GeometryReader so the dismiss gesture
can allow swipes outside the comments area instead of blanket-blocking.
This commit is contained in:
Arkadiusz Fal
2026-02-12 04:42:32 +01:00
parent b6b6d280e1
commit 6c30e745d9
7 changed files with 76 additions and 2 deletions

View File

@@ -481,6 +481,9 @@ extension ExpandedPlayerSheet {
withTransaction(transaction) {
isPortraitPanelVisible = false
navigationCoordinator?.isPortraitPanelVisible = false
isCommentsExpanded = false
navigationCoordinator?.isCommentsExpanded = false
navigationCoordinator?.commentsFrame = .zero
panelDragOffset = 0
videoYOffset = 0 // Reset offset (centerY is now the base)
}