Skip to content

Commit 11586b6

Browse files
committed
fix issue with statusBarHeight constant
1 parent d596c13 commit 11586b6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/helpers/Constants.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ export function getAndroidVersion() {
1919

2020
/* Navigation */
2121
const {StatusBarManager} = NativeModules;
22-
export let statusBarHeight = setStatusBarHeight();
22+
export const statusBarHeight = setStatusBarHeight();
2323

2424
function setStatusBarHeight() {
25-
statusBarHeight = isIOS ? 20 : StatusBarManager.HEIGHT;
25+
let height = 0;
26+
height = isIOS ? 20 : StatusBarManager.HEIGHT;
2627
if (isIOS) {
2728
// override guesstimate height with the actual height from StatusBarManager
28-
StatusBarManager.getHeight(data => (statusBarHeight = data.height));
29+
StatusBarManager.getHeight(data => (height = data.height));
2930
}
31+
return height;
3032
}
3133

3234
/* Layout */

0 commit comments

Comments
 (0)