Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

middleware.js 880B

123456789101112131415161718192021222324252627282930313233343536
  1. // @flow
  2. import { SET_ROOM } from '../base/conference';
  3. import { MiddlewareRegistry } from '../base/redux';
  4. import { setSettingsViewVisible } from './actions';
  5. /**
  6. * The redux middleware to set the visibility of {@link SettingsView}.
  7. *
  8. * @param {Store} store - The redux store.
  9. * @returns {Function}
  10. */
  11. MiddlewareRegistry.register(store => next => action => {
  12. switch (action.type) {
  13. case SET_ROOM:
  14. return _hideSettingsView(store, next, action);
  15. }
  16. return next(action);
  17. });
  18. /**
  19. * Hides {@link SettingsView}.
  20. *
  21. * @param {Store} store - The redux store.
  22. * @param {Dispatch} next - The redux {@code dispatch} function.
  23. * @param {Action} action - The redux action.
  24. * @private
  25. * @returns {Object} The new state.
  26. */
  27. function _hideSettingsView({ dispatch }, next, action) {
  28. dispatch(setSettingsViewVisible(false));
  29. return next(action);
  30. }