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

functions.native.js 829B

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