選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

functions.any.ts 783B

123456789101112131415161718192021
  1. import { IStateful } from '../base/app/types';
  2. import { toState } from '../base/redux/functions';
  3. import { areThereNotifications } from '../notifications/functions';
  4. import { getOverlayToRender } from '../overlay/functions';
  5. /**
  6. * Tells whether or not the notifications should be displayed within
  7. * the conference feature based on the current Redux state.
  8. *
  9. * @param {Object|Function} stateful - The redux store state.
  10. * @returns {boolean}
  11. */
  12. export function shouldDisplayNotifications(stateful: IStateful) {
  13. const state = toState(stateful);
  14. const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
  15. const { calleeInfoVisible } = state['features/invite'];
  16. return areThereNotifications(state)
  17. && !isAnyOverlayVisible
  18. && !calleeInfoVisible;
  19. }