fix(native) add missing function
This commit is contained in:
parent
5e2ee3bdcd
commit
a270e4300a
|
@ -0,0 +1,20 @@
|
|||
import { toState } from '../base/redux';
|
||||
import { areThereNotifications } from '../notifications';
|
||||
import { getOverlayToRender } from '../overlay';
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
const state = toState(stateful);
|
||||
const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
|
||||
const { calleeInfoVisible } = state['features/invite'];
|
||||
|
||||
return areThereNotifications(state)
|
||||
&& !isAnyOverlayVisible
|
||||
&& !calleeInfoVisible;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
export * from './functions.any';
|
|
@ -4,13 +4,11 @@ import { translateToHTML } from '../base/i18n';
|
|||
import { getLocalParticipant } from '../base/participants';
|
||||
import { toState } from '../base/redux';
|
||||
import { getBackendSafePath, getJitsiMeetGlobalNS } from '../base/util';
|
||||
import {
|
||||
areThereNotifications,
|
||||
showWarningNotification
|
||||
} from '../notifications';
|
||||
import { getOverlayToRender } from '../overlay';
|
||||
import { showWarningNotification } from '../notifications';
|
||||
import { createRnnoiseProcessorPromise } from '../rnnoise';
|
||||
|
||||
export * from './functions.any';
|
||||
|
||||
/**
|
||||
* Returns the result of getWiFiStats from the global NS or does nothing
|
||||
(returns empty result).
|
||||
|
@ -52,23 +50,6 @@ export function maybeShowSuboptimalExperienceNotification(dispatch, t) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
const state = toState(stateful);
|
||||
const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
|
||||
const { calleeInfoVisible } = state['features/invite'];
|
||||
|
||||
return areThereNotifications(state)
|
||||
&& !isAnyOverlayVisible
|
||||
&& !calleeInfoVisible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object aggregating the conference options.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue