2022-11-10 08:45:56 +00:00
|
|
|
import { IStateful } from '../base/app/types';
|
|
|
|
import { toState } from '../base/redux/functions';
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2020-10-08 09:41:00 +00:00
|
|
|
export * from './functions.any';
|
2021-10-20 19:29:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 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}.
|
|
|
|
*/
|
2022-11-10 08:45:56 +00:00
|
|
|
export function getDisablePolls(stateful: IStateful) {
|
2021-11-11 14:32:56 +00:00
|
|
|
const state = toState(stateful)['features/base/config'];
|
2021-10-20 19:29:21 +00:00
|
|
|
|
|
|
|
return state.disablePolls;
|
|
|
|
}
|
2021-11-11 14:32:56 +00:00
|
|
|
|