snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
28
react/features/participants-pane/middleware.ts
Normal file
28
react/features/participants-pane/middleware.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { AnyAction } from 'redux';
|
||||
|
||||
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
||||
|
||||
import { PARTICIPANTS_PANE_CLOSE, PARTICIPANTS_PANE_OPEN } from './actionTypes';
|
||||
|
||||
/**
|
||||
* Middleware which intercepts participants pane actions.
|
||||
*
|
||||
* @param {IStore} store - The redux store.
|
||||
* @returns {Function}
|
||||
*/
|
||||
MiddlewareRegistry.register(() => (next: Function) => (action: AnyAction) => {
|
||||
switch (action.type) {
|
||||
case PARTICIPANTS_PANE_OPEN:
|
||||
if (typeof APP !== 'undefined') {
|
||||
APP.API.notifyParticipantsPaneToggled(true);
|
||||
}
|
||||
break;
|
||||
case PARTICIPANTS_PANE_CLOSE:
|
||||
if (typeof APP !== 'undefined') {
|
||||
APP.API.notifyParticipantsPaneToggled(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return next(action);
|
||||
});
|
||||
Reference in New Issue
Block a user