MCPcopy
hub / github.com/testshallpass/react-native-dropdownalert / _updateStatusBar

Function _updateStatusBar

DropdownAlert.tsx:412–437  ·  view source on GitHub ↗
(active = false, type = '')

Source from the content-addressed store, hash-verified

410 dismiss(_dismiss);
411
412 function _updateStatusBar(active = false, type = '') {
413 if (updateStatusBar && alertPosition === DropdownAlertPosition.Top) {
414 if (isAndroid) {
415 if (active) {
416 let backgroundColor = activeStatusBarBackgroundColor;
417 if (!backgroundColor) {
418 const colorForType = _getBackgroundColorForType(type);
419 if (colorForType) {
420 backgroundColor = colorForType;
421 } else {
422 backgroundColor = DropdownAlertColor.Default;
423 }
424 }
425 StatusBar.setBackgroundColor(backgroundColor, true);
426 StatusBar.setTranslucent(translucent);
427 } else {
428 StatusBar.setBackgroundColor(inactiveStatusBarBackgroundColor, true);
429 }
430 }
431 if (active) {
432 StatusBar.setBarStyle(activeStatusBarStyle, true);
433 } else {
434 StatusBar.setBarStyle(inactiveStatusBarStyle, true);
435 }
436 }
437 }
438
439 function _clearDismissTimeoutID() {
440 if (dismissTimeoutID.current) {

Callers 2

_alertFunction · 0.85
_dismissFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…