Files
jitsi-meet/react/features/dynamic-branding/middleware.native.js
Calinteodor f3f9cd3d05 feat(dynamic-branding) add initial mobile SDK customization
* feat(dynamic-branding) sdk customization

* feat(dynamic-branding) unsetDynamicBranding when we disconnect

* feat(dynamic-branding) added branding colors to conference

* feat(dynamic-branding) extracted logger to its own file

* feat(dynamic-branding) reverted style change

* feat(dynamic-branding) unset branding if connection failed

* feat(dynamic-branding) removed index.js, updated imports, added ImageBackground component

* feat(dynamic-branding) created logger feature object

* feat(dynamic-branding) moved brandingStyles to mapStateToProps, used SvGUri

* feat(dynamic-branding) created BrandingImageBackground component, fixed styles

* feat(dynamic-branding) moved BrandingImageBackground to dynamic-branding feature

* feat(dynamic-branding) fixed linter

* feat(dynamic-branding) added style comment
2022-05-23 17:02:14 +02:00

37 lines
831 B
JavaScript

import { SET_CONFIG } from '../base/config';
import { MiddlewareRegistry } from '../base/redux';
import { SET_DYNAMIC_BRANDING_DATA } from './actionTypes';
import { fetchCustomBrandingData } from './actions.native';
MiddlewareRegistry.register(store => next => action => {
switch (action.type) {
case SET_CONFIG: {
const result = next(action);
store.dispatch(fetchCustomBrandingData());
return result;
}
case SET_DYNAMIC_BRANDING_DATA: {
const {
avatarBackgrounds,
backgroundColor,
backgroundImageUrl
} = action.value;
action.value = {
...action.value,
avatarBackgrounds,
backgroundColor,
backgroundImageUrl
};
break;
}
}
return next(action);
});