misc: fix dispatching actions twice when mapDispatchToProps is used
The functions need not return anything, or it will be dispatched as another action.
This commit is contained in:
parent
0c446026d6
commit
0bf9a78e4c
|
@ -228,7 +228,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_onConnect() {
|
_onConnect() {
|
||||||
return dispatch(connect());
|
dispatch(connect());
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -238,7 +238,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_onDisconnect() {
|
_onDisconnect() {
|
||||||
return dispatch(disconnect());
|
dispatch(disconnect());
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -250,7 +250,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_setToolboxVisible(visible: boolean) {
|
_setToolboxVisible(visible: boolean) {
|
||||||
return dispatch(setToolboxVisible(visible));
|
dispatch(setToolboxVisible(visible));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ function _mapDispatchToProps(dispatch: Function): Object {
|
||||||
* @returns {Object} Dispatched action.
|
* @returns {Object} Dispatched action.
|
||||||
*/
|
*/
|
||||||
_reloadNow() {
|
_reloadNow() {
|
||||||
return dispatch(_reloadNow());
|
dispatch(_reloadNow());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ function _mapDispatchToProps(dispatch: Function): Object {
|
||||||
* @returns {Object} Dispatched action.
|
* @returns {Object} Dispatched action.
|
||||||
*/
|
*/
|
||||||
_onSideToolbarContainerToggled(containerId: string) {
|
_onSideToolbarContainerToggled(containerId: string) {
|
||||||
return dispatch(toggleSideToolbarContainer(containerId));
|
dispatch(toggleSideToolbarContainer(containerId));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,7 +268,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
_onRoomLock() {
|
_onRoomLock() {
|
||||||
return dispatch(beginRoomLockRequest());
|
dispatch(beginRoomLockRequest());
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -279,7 +279,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
_onShareRoom() {
|
_onShareRoom() {
|
||||||
return dispatch(beginShareRoom());
|
dispatch(beginShareRoom());
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -290,7 +290,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
_onToggleAudioOnly() {
|
_onToggleAudioOnly() {
|
||||||
return dispatch(toggleAudioOnly());
|
dispatch(toggleAudioOnly());
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -302,7 +302,7 @@ function _mapDispatchToProps(dispatch) {
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
_onToggleCameraFacingMode() {
|
_onToggleCameraFacingMode() {
|
||||||
return dispatch(toggleCameraFacingMode());
|
dispatch(toggleCameraFacingMode());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ export function abstractMapDispatchToProps(dispatch: Dispatch<*>): Object {
|
||||||
// business to know that anyway. The undefined value is our
|
// business to know that anyway. The undefined value is our
|
||||||
// expression of (1) the lack of knowledge & (2) the desire to no
|
// expression of (1) the lack of knowledge & (2) the desire to no
|
||||||
// longer have a valid room name to join.
|
// longer have a valid room name to join.
|
||||||
return dispatch(appNavigate(undefined));
|
dispatch(appNavigate(undefined));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +43,7 @@ export function abstractMapDispatchToProps(dispatch: Dispatch<*>): Object {
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
_onToggleAudio() {
|
_onToggleAudio() {
|
||||||
return dispatch(toggleAudioMuted());
|
dispatch(toggleAudioMuted());
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,7 +54,7 @@ export function abstractMapDispatchToProps(dispatch: Dispatch<*>): Object {
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
_onToggleVideo() {
|
_onToggleVideo() {
|
||||||
return dispatch(toggleVideoMuted());
|
dispatch(toggleVideoMuted());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue