Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

functions.native.js 746B

1234567891011121314151617181920
  1. // @flow
  2. import { TOOLBOX_ALWAYS_VISIBLE, getFeatureFlag } from '../base/flags';
  3. import { toState } from '../base/redux';
  4. /**
  5. * Returns true if the toolbox is visible.
  6. *
  7. * @param {Object | Function} stateful - A function or object that can be
  8. * resolved to Redux state by the function {@code toState}.
  9. * @returns {boolean}
  10. */
  11. export function isToolboxVisible(stateful: Object | Function) {
  12. const state = toState(stateful);
  13. const { alwaysVisible, enabled, visible } = state['features/toolbox'];
  14. const { length: participantCount } = state['features/base/participants'];
  15. const flag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false);
  16. return enabled && (alwaysVisible || visible || participantCount === 1 || flag);
  17. }