Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

functions.js 718B

1234567891011121314151617181920
  1. import { WELCOME_PAGE_ENABLED } from '../base/flags/constants';
  2. import { getFeatureFlag } from '../base/flags/functions';
  3. import { toState } from '../base/redux/functions';
  4. /**
  5. * Determines whether the {@code WelcomePage} is enabled.
  6. *
  7. * @param {Function|Object} stateful - The redux state or {@link getState}
  8. * function.
  9. * @returns {boolean} If the {@code WelcomePage} is enabled by the app, then
  10. * {@code true}; otherwise, {@code false}.
  11. */
  12. export function isWelcomePageEnabled(stateful: Function | Object) {
  13. if (navigator.product === 'ReactNative') {
  14. return getFeatureFlag(stateful, WELCOME_PAGE_ENABLED, false);
  15. }
  16. return toState(stateful)['features/base/config'].enableWelcomePage;
  17. }