From c4b31435fbac86fe18c4926e417dd5a0b0e381c8 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Thu, 17 May 2018 15:42:21 -0700 Subject: [PATCH] ref(video-layout): create middleware to update video layout The goal will be to make video layout stateless and instead get all state from redux. --- react/features/app/components/App.web.js | 1 + react/features/video-layout/index.js | 1 + react/features/video-layout/middleware.native.js | 0 react/features/video-layout/middleware.web.js | 12 ++++++++++++ 4 files changed, 14 insertions(+) create mode 100644 react/features/video-layout/index.js create mode 100644 react/features/video-layout/middleware.native.js create mode 100644 react/features/video-layout/middleware.web.js diff --git a/react/features/app/components/App.web.js b/react/features/app/components/App.web.js index aaa8c18ef..aa3dfcc46 100644 --- a/react/features/app/components/App.web.js +++ b/react/features/app/components/App.web.js @@ -5,6 +5,7 @@ import '../../base/responsive-ui'; import { getLocationContextRoot } from '../../base/util'; import '../../chat'; import '../../room-lock'; +import '../../video-layout'; import { AbstractApp } from './AbstractApp'; diff --git a/react/features/video-layout/index.js b/react/features/video-layout/index.js new file mode 100644 index 000000000..d43689289 --- /dev/null +++ b/react/features/video-layout/index.js @@ -0,0 +1 @@ +import './middleware'; diff --git a/react/features/video-layout/middleware.native.js b/react/features/video-layout/middleware.native.js new file mode 100644 index 000000000..e69de29bb diff --git a/react/features/video-layout/middleware.web.js b/react/features/video-layout/middleware.web.js new file mode 100644 index 000000000..c0930695d --- /dev/null +++ b/react/features/video-layout/middleware.web.js @@ -0,0 +1,12 @@ +import { MiddlewareRegistry } from '../base/redux'; + +/** + * Middleware which intercepts actions and updates the legacy component + * {@code VideoLayout} as needed. The purpose of this middleware is to redux-ify + * {@code VideoLayout} without having to simultaneously react-ifying it. + * + * @param {Store} store - The redux store. + * @returns {Function} + */ +// eslint-disable-next-line no-unused-vars +MiddlewareRegistry.register(store => next => action => next(action));