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

functions.any.ts 994B

12345678910111213141516171819202122232425262728293031323334
  1. import { IStateful } from '../base/app/types';
  2. import { toState } from '../base/redux/functions';
  3. import { iAmVisitor } from '../visitors/functions';
  4. /**
  5. * Tells whether or not the notifications should be displayed within
  6. * the conference feature based on the current Redux state.
  7. *
  8. * @param {Object|Function} stateful - The redux store state.
  9. * @returns {boolean}
  10. */
  11. export function shouldDisplayNotifications(stateful: IStateful) {
  12. const state = toState(stateful);
  13. const { calleeInfoVisible } = state['features/invite'];
  14. return !calleeInfoVisible;
  15. }
  16. /**
  17. *
  18. * Returns true if polls feature is disabled.
  19. *
  20. * @param {(Function|Object)} stateful - The (whole) redux state, or redux's
  21. * {@code getState} function to be used to retrieve the state
  22. * features/base/config.
  23. * @returns {boolean}
  24. */
  25. export function arePollsDisabled(stateful: IStateful) {
  26. const state = toState(stateful);
  27. return state['features/base/config']?.disablePolls || iAmVisitor(state);
  28. }