Skip to content

Commit 5d6723c

Browse files
committed
fix bug for isIphoneX
1 parent 4c98ada commit 5d6723c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/helpers/Constants.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ export function getAndroidVersion() {
1919
return isAndroid ? parseInt(Platform.Version, 10) : undefined;
2020
}
2121

22-
/* Devices */
23-
export const isIphoneX = isIOS && !Platform.isPad && !Platform.isTVOS && (screenHeight >= 812 || screenWidth >= 812);
24-
2522
/* Navigation */
2623
const {StatusBarManager} = NativeModules;
2724
export let statusBarHeight = setStatusBarHeight();
@@ -50,6 +47,9 @@ export function getSafeAreaInsets() {
5047
{left: 0, right: 0, bottom: 34, top: 44};
5148
}
5249

50+
/* Devices */
51+
export const isIphoneX = isIOS && !Platform.isPad && !Platform.isTVOS && (screenHeight >= 812 || screenWidth >= 812);
52+
5353
/* Orientation */
5454
function getOrientation(height, width) {
5555
return width < height ? orientations.PORTRAIT : orientations.LANDSCAPE;

0 commit comments

Comments
 (0)