Sfoglia il codice sorgente

misc: fix dispatching actions twice when mapDispatchToProps is used

The functions need not return anything, or it will be dispatched as another
action.
j8
Saúl Ibarra Corretgé 8 anni fa
parent
commit
0bf9a78e4c

+ 3
- 3
react/features/conference/components/Conference.native.js Vedi File

228
          * @private
228
          * @private
229
          */
229
          */
230
         _onConnect() {
230
         _onConnect() {
231
-            return dispatch(connect());
231
+            dispatch(connect());
232
         },
232
         },
233
 
233
 
234
         /**
234
         /**
238
          * @private
238
          * @private
239
          */
239
          */
240
         _onDisconnect() {
240
         _onDisconnect() {
241
-            return dispatch(disconnect());
241
+            dispatch(disconnect());
242
         },
242
         },
243
 
243
 
244
         /**
244
         /**
250
          * @private
250
          * @private
251
          */
251
          */
252
         _setToolboxVisible(visible: boolean) {
252
         _setToolboxVisible(visible: boolean) {
253
-            return dispatch(setToolboxVisible(visible));
253
+            dispatch(setToolboxVisible(visible));
254
         }
254
         }
255
     };
255
     };
256
 }
256
 }

+ 1
- 1
react/features/overlay/components/ReloadButton.js Vedi File

79
          * @returns {Object} Dispatched action.
79
          * @returns {Object} Dispatched action.
80
          */
80
          */
81
         _reloadNow() {
81
         _reloadNow() {
82
-            return dispatch(_reloadNow());
82
+            dispatch(_reloadNow());
83
         }
83
         }
84
     };
84
     };
85
 }
85
 }

+ 1
- 1
react/features/toolbox/components/SecondaryToolbar.web.js Vedi File

121
          * @returns {Object} Dispatched action.
121
          * @returns {Object} Dispatched action.
122
          */
122
          */
123
         _onSideToolbarContainerToggled(containerId: string) {
123
         _onSideToolbarContainerToggled(containerId: string) {
124
-            return dispatch(toggleSideToolbarContainer(containerId));
124
+            dispatch(toggleSideToolbarContainer(containerId));
125
         }
125
         }
126
     };
126
     };
127
 }
127
 }

+ 4
- 4
react/features/toolbox/components/Toolbox.native.js Vedi File

268
          * @type {Function}
268
          * @type {Function}
269
          */
269
          */
270
         _onRoomLock() {
270
         _onRoomLock() {
271
-            return dispatch(beginRoomLockRequest());
271
+            dispatch(beginRoomLockRequest());
272
         },
272
         },
273
 
273
 
274
         /**
274
         /**
279
          * @type {Function}
279
          * @type {Function}
280
          */
280
          */
281
         _onShareRoom() {
281
         _onShareRoom() {
282
-            return dispatch(beginShareRoom());
282
+            dispatch(beginShareRoom());
283
         },
283
         },
284
 
284
 
285
         /**
285
         /**
290
          * @type {Function}
290
          * @type {Function}
291
          */
291
          */
292
         _onToggleAudioOnly() {
292
         _onToggleAudioOnly() {
293
-            return dispatch(toggleAudioOnly());
293
+            dispatch(toggleAudioOnly());
294
         },
294
         },
295
 
295
 
296
         /**
296
         /**
302
          * @type {Function}
302
          * @type {Function}
303
          */
303
          */
304
         _onToggleCameraFacingMode() {
304
         _onToggleCameraFacingMode() {
305
-            return dispatch(toggleCameraFacingMode());
305
+            dispatch(toggleCameraFacingMode());
306
         }
306
         }
307
     };
307
     };
308
 }
308
 }

+ 3
- 3
react/features/toolbox/functions.native.js Vedi File

31
             // business to know that anyway. The undefined value is our
31
             // business to know that anyway. The undefined value is our
32
             // expression of (1) the lack of knowledge & (2) the desire to no
32
             // expression of (1) the lack of knowledge & (2) the desire to no
33
             // longer have a valid room name to join.
33
             // longer have a valid room name to join.
34
-            return dispatch(appNavigate(undefined));
34
+            dispatch(appNavigate(undefined));
35
         },
35
         },
36
 
36
 
37
         /**
37
         /**
43
          * @type {Function}
43
          * @type {Function}
44
          */
44
          */
45
         _onToggleAudio() {
45
         _onToggleAudio() {
46
-            return dispatch(toggleAudioMuted());
46
+            dispatch(toggleAudioMuted());
47
         },
47
         },
48
 
48
 
49
         /**
49
         /**
54
          * @type {Function}
54
          * @type {Function}
55
          */
55
          */
56
         _onToggleVideo() {
56
         _onToggleVideo() {
57
-            return dispatch(toggleVideoMuted());
57
+            dispatch(toggleVideoMuted());
58
         }
58
         }
59
     };
59
     };
60
 }
60
 }

Loading…
Annulla
Salva