You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.any.js 579B

12345678910111213141516171819202122232425
  1. // @flow
  2. import { type Dispatch } from 'redux';
  3. import {
  4. getCurrentConference
  5. } from '../base/conference';
  6. /**
  7. * Action to toggle lobby mode on or off.
  8. *
  9. * @param {boolean} enabled - The desired (new) state of the lobby mode.
  10. * @returns {Function}
  11. */
  12. export function toggleLobbyMode(enabled: boolean) {
  13. return async (dispatch: Dispatch<any>, getState: Function) => {
  14. const conference = getCurrentConference(getState);
  15. if (enabled) {
  16. conference.enableLobby();
  17. } else {
  18. conference.disableLobby();
  19. }
  20. };
  21. }