From 2d65bc756fae0cd961e5b94545a9f589107a9a8b Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 1 Oct 2026 06:46:06 +0200 Subject: [PATCH] Animate the tabletop layout switch on hinge changes --- Yattee/Views/Player/ExpandedPlayerSheet.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Yattee/Views/Player/ExpandedPlayerSheet.swift b/Yattee/Views/Player/ExpandedPlayerSheet.swift index ed3f70bb..1e1f119a 100644 --- a/Yattee/Views/Player/ExpandedPlayerSheet.swift +++ b/Yattee/Views/Player/ExpandedPlayerSheet.swift @@ -362,6 +362,12 @@ struct ExpandedPlayerSheet: View { standardPlayerContent(geometry: geometry) #endif } + #if os(iOS) + // Applied inside the animation-stripping transaction below so the + // hinge-driven tabletop switch still animates the video between + // the screen center and the upper half. + .animation(.easeInOut(duration: 0.3), value: isTabletopHinge) + #endif .transaction { transaction in // Disable animations during layout switch to prevent position interpolation transaction.animation = nil