INNER CODE UNIT · JavaScript

handleAppStateActiveOnce

proyecto26/react-native-inappbrowser · utils.js:56

function handleAppStateActiveOnce(): Promise<void> {
  return new Promise(function (resolve) {
    let appStateEventSubscription: ?EmitterSubscription;

    function handleAppStateChange(nextAppState: AppStateStatus) {
      if (!_isAppStateAvailable) {
        _isAppStateAvailable = true;
        return;
      }

      if (nextAppState === 'active') {
        if (
          appStateEventSubscription &&
          appStateEventSubscription.remove !== undefined
        ) {
          appStateEventSubscription.remove();
        } else {
          AppState.removeEventListener('change', handleAppStateChange);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…