mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat: Reduces into state region and shard changes from the lib. (#14546)
* feat: Reduces into state region and shard changes from the lib. * squash: Fixes few comments. * chore(deps) lib-jitsi-meet@latest https://github.com/jitsi/lib-jitsi-meet/compare/v1802.0.0+49ff6eb4...v1803.0.0+5237dbfe
This commit is contained in:
@@ -3,6 +3,7 @@ import _ from 'lodash';
|
||||
import { CONFERENCE_INFO } from '../../conference/components/constants';
|
||||
import { TOOLBAR_BUTTONS } from '../../toolbox/constants';
|
||||
import { ToolbarButton } from '../../toolbox/types';
|
||||
import { CONNECTION_PROPERTIES_UPDATED } from '../connection/actionTypes';
|
||||
import ReducerRegistry from '../redux/ReducerRegistry';
|
||||
import { equals } from '../redux/functions';
|
||||
|
||||
@@ -94,6 +95,24 @@ ReducerRegistry.register<IConfigState>('features/base/config', (state = _getInit
|
||||
locationURL: action.locationURL
|
||||
};
|
||||
|
||||
case CONNECTION_PROPERTIES_UPDATED: {
|
||||
const { region, shard } = action.properties;
|
||||
const { deploymentInfo } = state;
|
||||
|
||||
if (deploymentInfo?.region === region && deploymentInfo?.shard === shard) {
|
||||
return state;
|
||||
}
|
||||
|
||||
return {
|
||||
...state,
|
||||
deploymentInfo: JSON.parse(JSON.stringify({
|
||||
...deploymentInfo,
|
||||
region,
|
||||
shard
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
case LOAD_CONFIG_ERROR:
|
||||
// XXX LOAD_CONFIG_ERROR is one of the settlement execution paths of
|
||||
// the asynchronous "loadConfig procedure/process" started with
|
||||
|
||||
Reference in New Issue
Block a user