Browse Source

Add the ability to do partial updates on the flatten profile object

master
zbettenbuk 7 years ago
parent
commit
1474304cc5

+ 4
- 1
react/features/base/profile/reducer.js View File

16
     STORE_NAME, (state = {}, action) => {
16
     STORE_NAME, (state = {}, action) => {
17
         switch (action.type) {
17
         switch (action.type) {
18
         case PROFILE_UPDATED:
18
         case PROFILE_UPDATED:
19
-            return action.profile;
19
+            return {
20
+                ...state,
21
+                ...action.profile
22
+            };
20
         }
23
         }
21
 
24
 
22
         return state;
25
         return state;

+ 1
- 4
react/features/settings/components/AbstractSettingsView.js View File

150
      * @returns {void}
150
      * @returns {void}
151
      */
151
      */
152
     _updateProfile(updateObject: Object) {
152
     _updateProfile(updateObject: Object) {
153
-        this.props.dispatch(updateProfile({
154
-            ...this.props._profile,
155
-            ...updateObject
156
-        }));
153
+        this.props.dispatch(updateProfile(updateObject));
157
     }
154
     }
158
 }
155
 }
159
 
156
 

Loading…
Cancel
Save