fix(rn,screensharing) fix build

This commit is contained in:
Saúl Ibarra Corretgé 2022-10-13 11:53:15 +02:00 committed by Saúl Ibarra Corretgé
parent be93fbd512
commit 4018e8875f
1 changed files with 11 additions and 22 deletions

View File

@ -20,19 +20,7 @@ export * from './actions.any';
* @returns {Function}
*/
export function toggleScreensharing(enabled: boolean): Function {
return (store: IStore) => _toggleScreenSharing(enabled, store);
}
/**
* Toggles screen sharing.
*
* @private
* @param {boolean} enabled - The state to toggle screen sharing to.
* @param {Store} store - The redux.
* @returns {void}
*/
function _toggleScreenSharing(enabled: boolean, store: IStore): void {
const { dispatch, getState } = store;
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
const state = getState();
if (enabled) {
@ -45,6 +33,7 @@ function _toggleScreenSharing(enabled: boolean, store: IStore): void {
dispatch(destroyLocalDesktopTrackIfExists());
setPictureInPictureEnabled(true);
}
};
}
/**