|
@@ -1,9 +1,16 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
|
-import { ReducerRegistry } from '../base/redux';
|
|
3
|
+import { PersistenceRegistry, ReducerRegistry } from '../base/redux';
|
4
|
4
|
|
5
|
5
|
import { BACKGROUND_ENABLED, SET_VIRTUAL_BACKGROUND } from './actionTypes';
|
6
|
6
|
|
|
7
|
+const STORE_NAME = 'features/virtual-background';
|
|
8
|
+
|
|
9
|
+/**
|
|
10
|
+ * Sets up the persistence of the feature {@code virtual-background}.
|
|
11
|
+ */
|
|
12
|
+PersistenceRegistry.register(STORE_NAME, true);
|
|
13
|
+
|
7
|
14
|
/**
|
8
|
15
|
* Reduces redux actions which activate/deactivate virtual background image, or
|
9
|
16
|
* indicate if the virtual image background is activated/deactivated. The
|
|
@@ -15,7 +22,7 @@ import { BACKGROUND_ENABLED, SET_VIRTUAL_BACKGROUND } from './actionTypes';
|
15
|
22
|
* @returns {State} The next redux state that is the result of reducing the
|
16
|
23
|
* specified action.
|
17
|
24
|
*/
|
18
|
|
-ReducerRegistry.register('features/virtual-background', (state = {}, action) => {
|
|
25
|
+ReducerRegistry.register(STORE_NAME, (state = {}, action) => {
|
19
|
26
|
const { virtualSource, isVirtualBackground, backgroundEffectEnabled } = action;
|
20
|
27
|
|
21
|
28
|
switch (action.type) {
|