mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-17 01:27:48 +00:00
Don't show more menu on the main room Fix join room on mobile web When moving to room reset breakout rooms state to avoid showing incorrect data before response from prosody is received
43 lines
847 B
JavaScript
43 lines
847 B
JavaScript
// @flow
|
|
|
|
import { ReducerRegistry } from '../base/redux';
|
|
|
|
import {
|
|
_RESET_BREAKOUT_ROOMS,
|
|
_UPDATE_ROOM_COUNTER,
|
|
UPDATE_BREAKOUT_ROOMS
|
|
} from './actionTypes';
|
|
import { FEATURE_KEY } from './constants';
|
|
|
|
const DEFAULT_STATE = {
|
|
rooms: {},
|
|
roomCounter: 0
|
|
};
|
|
|
|
/**
|
|
* Listen for actions for the breakout-rooms feature.
|
|
*/
|
|
ReducerRegistry.register(FEATURE_KEY, (state = DEFAULT_STATE, action) => {
|
|
switch (action.type) {
|
|
case _UPDATE_ROOM_COUNTER:
|
|
return {
|
|
...state,
|
|
roomCounter: action.roomCounter
|
|
};
|
|
case UPDATE_BREAKOUT_ROOMS: {
|
|
const { roomCounter, rooms } = action;
|
|
|
|
return {
|
|
...state,
|
|
roomCounter,
|
|
rooms
|
|
};
|
|
}
|
|
case _RESET_BREAKOUT_ROOMS: {
|
|
return DEFAULT_STATE;
|
|
}
|
|
}
|
|
|
|
return state;
|
|
});
|