(action = DropdownAlertDismissAction.Programmatic)
| 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 = '') { |
no test coverage detected
searching dependent graphs…