File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,14 @@ export default class DropdownAlert extends Component {
272272 ) ;
273273 }
274274 } ;
275+ resetStatusBarColor = ( ) => {
276+ if ( this . props . updateStatusBar ) {
277+ if ( IS_ANDROID ) {
278+ StatusBar . setBackgroundColor ( this . props . inactiveStatusBarBackgroundColor , true ) ;
279+ }
280+ StatusBar . setBarStyle ( this . props . inactiveStatusBarStyle , true ) ;
281+ }
282+ }
275283 close = action => {
276284 if ( action == undefined ) {
277285 action = 'programmatic' ;
@@ -285,15 +293,11 @@ export default class DropdownAlert extends Component {
285293 clearTimeout ( this . _closeTimeoutId ) ;
286294 }
287295 this . animate ( 0 ) ;
288- if ( this . props . updateStatusBar ) {
289- if ( IS_ANDROID ) {
290- StatusBar . setBackgroundColor ( this . props . inactiveStatusBarBackgroundColor , true ) ;
291- }
292- StatusBar . setBarStyle ( this . props . inactiveStatusBarStyle , true ) ;
293- }
296+ this . resetStatusBarColor ( ) ;
294297 setTimeout (
295298 function ( ) {
296299 if ( this . state . isOpen ) {
300+ this . resetStatusBarColor ( ) ;
297301 this . setState ( {
298302 isOpen : false ,
299303 } ) ;
@@ -320,12 +324,7 @@ export default class DropdownAlert extends Component {
320324 this . setState ( {
321325 isOpen : false ,
322326 } ) ;
323- if ( this . props . updateStatusBar ) {
324- if ( IS_ANDROID ) {
325- StatusBar . setBackgroundColor ( this . props . inactiveStatusBarBackgroundColor , true ) ;
326- }
327- StatusBar . setBarStyle ( this . props . inactiveStatusBarStyle , true ) ;
328- }
327+ this . resetStatusBarColor ( ) ;
329328 }
330329 }
331330 animate = toValue => {
You can’t perform that action at this time.
0 commit comments