snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
38
react/features/conference/functions.any.ts
Normal file
38
react/features/conference/functions.any.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { IStateful } from '../base/app/types';
|
||||
import { toState } from '../base/redux/functions';
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
const state = toState(stateful);
|
||||
const { calleeInfoVisible } = state['features/invite'];
|
||||
|
||||
return !calleeInfoVisible;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns true if polls feature is disabled.
|
||||
*
|
||||
* @param {(Function|Object)} stateful - The (whole) redux state, or redux's
|
||||
* {@code getState} function to be used to retrieve the state
|
||||
* features/base/config.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function arePollsDisabled(stateful: IStateful) {
|
||||
const state = toState(stateful);
|
||||
|
||||
const { conference } = state['features/base/conference'];
|
||||
|
||||
if (!conference?.getPolls()?.isSupported()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return state['features/base/config']?.disablePolls;
|
||||
}
|
||||
Reference in New Issue
Block a user