Bladeren bron

feat(virtual-background) persist settings

j8
Tudor D. Pop 4 jaren geleden
bovenliggende
commit
39011d8fd3
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 9 en 2 verwijderingen
  1. 9
    2
      react/features/virtual-background/reducer.js

+ 9
- 2
react/features/virtual-background/reducer.js Bestand weergeven

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

Laden…
Annuleren
Opslaan