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.any.js 695B

1234567891011121314151617181920
  1. import { toState } from '../base/redux';
  2. import { areThereNotifications } from '../notifications';
  3. import { getOverlayToRender } from '../overlay';
  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) {
  12. const state = toState(stateful);
  13. const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
  14. const { calleeInfoVisible } = state['features/invite'];
  15. return areThereNotifications(state)
  16. && !isAnyOverlayVisible
  17. && !calleeInfoVisible;
  18. }