Skip to content

Commit

Permalink
fix: use top inset for header height on ipad (#10652)
Browse files Browse the repository at this point in the history
This fix uses the top inset for iPad header height calculation in the native stack.
There is a misplaced condition that uses `&&` when it should be `||`.

Fixes: #10609
  • Loading branch information
outaTiME authored and satya164 committed Nov 27, 2022
1 parent 8df5f56 commit 2bcf0f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/native-stack/src/views/NativeStackView.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const SceneView = ({

// Modals are fullscreen in landscape only on iPhone
const isIPhone =
Platform.OS === 'ios' && !(Platform.isPad && Platform.isTVOS);
Platform.OS === 'ios' && !(Platform.isPad || Platform.isTVOS);
const isLandscape = frame.width > frame.height;

const topInset = isModal || (isIPhone && isLandscape) ? 0 : insets.top;
Expand Down

0 comments on commit 2bcf0f5

Please sign in to comment.