Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

functions.native.js 822B

12345678910111213141516171819202122232425262728
  1. // @flow
  2. import { getFeatureFlag, FILMSTRIP_ENABLED } from '../base/flags';
  3. import { toState } from '../base/redux';
  4. /**
  5. * Returns true if the filmstrip on mobile is visible, false otherwise.
  6. *
  7. * NOTE: Filmstrip on mobile behaves differently to web, and is only visible
  8. * when there are at least 2 participants.
  9. *
  10. * @param {Object | Function} stateful - The Object or Function that can be
  11. * resolved to a Redux state object with the toState function.
  12. * @returns {boolean}
  13. */
  14. export function isFilmstripVisible(stateful: Object | Function) {
  15. const state = toState(stateful);
  16. const enabled = getFeatureFlag(state, FILMSTRIP_ENABLED, true);
  17. if (!enabled) {
  18. return false;
  19. }
  20. const { length: participantCount } = state['features/base/participants'];
  21. return participantCount > 1;
  22. }