Skip to content
TypeScript

fix(mobile): the unfolded Duo keeps its header in portrait (#24339)

Julius Marmingeb24e8ce2df0f
diff --git a/apps/mobile/src/native/V5StackHeader.ios.tsx b/apps/mobile/src/native/V5StackHeader.ios.tsx
index 8812fcfe968..afcb5795fce 100644
--- a/apps/mobile/src/native/V5StackHeader.ios.tsx
+++ b/apps/mobile/src/native/V5StackHeader.ios.tsx
@@ -274,10 +274,15 @@ export function V5StackHeader(props: {
backButtonHidden={options.headerBackVisible === false}
ios={{
navigationItemStyle: options.unstable_navigationItemStyle,
- // Opt-ins apply only on the Duo's short display; unset falls back to the system default.
- minimizationBehavior: isDuoDevice(deviceType)
- ? options.unstable_headerMinimizationBehavior
- : undefined,
+ // Opt-ins apply only where the Duo is short: folded, or held landscape. The Duo
+ // resolves `automatic` to minimize on scroll, so the tall unfolded display opts out.
+ minimizationBehavior: !isDuoDevice(deviceType)
+ ? undefined
+ : deviceType === "duo-unfolded" &&
+ nativeMetrics &&
+ nativeMetrics.height > nativeMetrics.width
+ ? "never"
+ : options.unstable_headerMinimizationBehavior,
tintColor: options.headerTintColor,
searchBar:
mailSearch || searchOptions ? (