jiti-meet/react/features/conference/functions.any.ts

19 lines
621 B
TypeScript
Raw Normal View History

import { IStateful } from '../base/app/types';
import { toState } from '../base/redux/functions';
import { areThereNotifications } from '../notifications/functions';
2020-10-08 09:41:00 +00:00
/**
* Tells whether or not the notifications should be displayed within
* the conference feature based on the current Redux state.
*
* @param {Object|Function} stateful - The redux store state.
* @returns {boolean}
*/
export function shouldDisplayNotifications(stateful: IStateful) {
2020-10-08 09:41:00 +00:00
const state = toState(stateful);
const { calleeInfoVisible } = state['features/invite'];
return areThereNotifications(state) && !calleeInfoVisible;
2020-10-08 09:41:00 +00:00
}