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

Function _dismiss

DropdownAlert.tsx:376–409  ·  view source on GitHub ↗
(action = DropdownAlertDismissAction.Programmatic)

Source from the content-addressed store, hash-verified

374 }
375
376 async function _dismiss(action = DropdownAlertDismissAction.Programmatic) {
377 if (!queue.current.isEmpty && !isLockRef.current) {
378 _clearDismissTimeoutID();
379 _updateStatusBar(false);
380 isLockRef.current = true;
381 await _animate(DropdownAlertToValue.Dismiss);
382 if (alertDataRef.current.resolve) {
383 alertDataRef.current.resolve(alertDataRef.current);
384 }
385 switch (action) {
386 case DropdownAlertDismissAction.Automatic:
387 onDismissAutomatic(alertDataRef.current);
388 break;
389 case DropdownAlertDismissAction.Programmatic:
390 onDismissProgrammatic(alertDataRef.current);
391 break;
392 case DropdownAlertDismissAction.Cancel:
393 onDismissCancel(alertDataRef.current);
394 break;
395 case DropdownAlertDismissAction.Pan:
396 onDismissPanResponder(alertDataRef.current);
397 break;
398 case DropdownAlertDismissAction.Press:
399 onDismissPress(alertDataRef.current);
400 break;
401 }
402 setDimValue(0);
403 queue.current.dequeue();
404 if (!queue.current.isEmpty) {
405 _alert(queue.current.first);
406 }
407 isLockRef.current = false;
408 }
409 }
410 dismiss(_dismiss);
411
412 function _updateStatusBar(active = false, type = '') {

Callers 4

DropdownAlertFunction · 0.85
_onDonePanFunction · 0.85
_alertFunction · 0.85
_onCancelFunction · 0.85

Calls 5

_clearDismissTimeoutIDFunction · 0.85
_updateStatusBarFunction · 0.85
_animateFunction · 0.85
_alertFunction · 0.85
dequeueMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…