Skip to content

Commit 28a0851

Browse files
committed
Merge pull request oblador#29 from xirc/fix-deprecated-statusbar-api
Fix deprecated warning of StatusBarIOS
2 parents f48418e + c4ec5d5 commit 28a0851

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

LightboxOverlay.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var {
1313
Dimensions,
1414
PanResponder,
1515
TouchableOpacity,
16-
StatusBarIOS,
16+
StatusBar,
1717
Modal,
1818
Platform,
1919
} = React;
@@ -107,9 +107,7 @@ var LightboxOverlay = React.createClass({
107107
},
108108

109109
open: function() {
110-
if(StatusBarIOS) {
111-
StatusBarIOS.setHidden(true, 'fade');
112-
}
110+
StatusBar.setHidden(true, 'fade');
113111
this.state.pan.setValue(0);
114112
this.setState({
115113
isAnimating: true,
@@ -127,9 +125,7 @@ var LightboxOverlay = React.createClass({
127125
},
128126

129127
close: function() {
130-
if(StatusBarIOS) {
131-
StatusBarIOS.setHidden(false, 'fade');
132-
}
128+
StatusBar.setHidden(false, 'fade');
133129
this.setState({
134130
isAnimating: true,
135131
});

0 commit comments

Comments
 (0)