mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-22 17:27:48 +00:00
24 lines
815 B
TypeScript
24 lines
815 B
TypeScript
import { createRestrictWhiteboardEvent } from '../analytics/AnalyticsEvents';
|
|
import { sendAnalytics } from '../analytics/functions';
|
|
import { IStore } from '../app/types';
|
|
import { navigateRoot } from '../mobile/navigation/rootNavigationContainerRef';
|
|
import { screen } from '../mobile/navigation/routes';
|
|
|
|
import { resetWhiteboard } from './actions.any';
|
|
|
|
export * from './actions.any';
|
|
|
|
/**
|
|
* Restricts the whiteboard usage.
|
|
*
|
|
* @param {boolean} shouldCloseWhiteboard - Whether to dismiss the whiteboard.
|
|
* @returns {Function}
|
|
*/
|
|
export const restrictWhiteboard = (shouldCloseWhiteboard = true) => (dispatch: IStore['dispatch']) => {
|
|
if (shouldCloseWhiteboard) {
|
|
navigateRoot(screen.conference.root);
|
|
}
|
|
dispatch(resetWhiteboard());
|
|
sendAnalytics(createRestrictWhiteboardEvent());
|
|
};
|