feat(virtual-background) persist settings
This commit is contained in:
parent
77f1a24344
commit
39011d8fd3
|
@ -1,9 +1,16 @@
|
|||
// @flow
|
||||
|
||||
import { ReducerRegistry } from '../base/redux';
|
||||
import { PersistenceRegistry, ReducerRegistry } from '../base/redux';
|
||||
|
||||
import { BACKGROUND_ENABLED, SET_VIRTUAL_BACKGROUND } from './actionTypes';
|
||||
|
||||
const STORE_NAME = 'features/virtual-background';
|
||||
|
||||
/**
|
||||
* Sets up the persistence of the feature {@code virtual-background}.
|
||||
*/
|
||||
PersistenceRegistry.register(STORE_NAME, true);
|
||||
|
||||
/**
|
||||
* Reduces redux actions which activate/deactivate virtual background image, or
|
||||
* indicate if the virtual image background is activated/deactivated. The
|
||||
|
@ -15,7 +22,7 @@ import { BACKGROUND_ENABLED, SET_VIRTUAL_BACKGROUND } from './actionTypes';
|
|||
* @returns {State} The next redux state that is the result of reducing the
|
||||
* specified action.
|
||||
*/
|
||||
ReducerRegistry.register('features/virtual-background', (state = {}, action) => {
|
||||
ReducerRegistry.register(STORE_NAME, (state = {}, action) => {
|
||||
const { virtualSource, isVirtualBackground, backgroundEffectEnabled } = action;
|
||||
|
||||
switch (action.type) {
|
||||
|
|
Loading…
Reference in New Issue