"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7312/react/features/participants-pane/middleware.ts" (1 Jun 2023, 780 Bytes) of package /linux/misc/jitsi-meet-7312.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "middleware.ts": 7292_vs_7293.

    1 import { AnyAction } from 'redux';
    2 
    3 import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
    4 
    5 import { PARTICIPANTS_PANE_CLOSE, PARTICIPANTS_PANE_OPEN } from './actionTypes';
    6 
    7 /**
    8  * Middleware which intercepts participants pane actions.
    9  *
   10  * @param {IStore} store - The redux store.
   11  * @returns {Function}
   12  */
   13 MiddlewareRegistry.register(() => (next: Function) => (action: AnyAction) => {
   14     switch (action.type) {
   15     case PARTICIPANTS_PANE_OPEN:
   16         if (typeof APP !== 'undefined') {
   17             APP.API.notifyParticipantsPaneToggled(true);
   18         }
   19         break;
   20     case PARTICIPANTS_PANE_CLOSE:
   21         if (typeof APP !== 'undefined') {
   22             APP.API.notifyParticipantsPaneToggled(false);
   23         }
   24         break;
   25     }
   26 
   27     return next(action);
   28 });