Clear raise hand status on confidence leave
This commit is contained in:
parent
50d7c1521f
commit
b1a70240fc
|
@ -210,7 +210,7 @@ StateListenerRegistry.register(
|
||||||
break;
|
break;
|
||||||
case 'raisedHand': {
|
case 'raisedHand': {
|
||||||
_raiseHandUpdated(
|
_raiseHandUpdated(
|
||||||
store, conference, participant, newValue);
|
store, conference, participant.getId(), newValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -219,6 +219,10 @@ StateListenerRegistry.register(
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// We left the conference, raise hand of the local participant must be updated.
|
||||||
|
_raiseHandUpdated(
|
||||||
|
store, conference, undefined, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -360,23 +364,25 @@ function _participantJoinedOrUpdated({ getState }, next, action) {
|
||||||
*
|
*
|
||||||
* @param {Function} dispatch - The Redux dispatch function.
|
* @param {Function} dispatch - The Redux dispatch function.
|
||||||
* @param {Object} conference - The conference for which we got an update.
|
* @param {Object} conference - The conference for which we got an update.
|
||||||
* @param {*} participant - The participant from which we got an update.
|
* @param {string?} participantId - The ID of the participant from which we got an update. If undefined,
|
||||||
* @param {*} newValue - The new value of the raise hand status.
|
* we update the local participant.
|
||||||
|
* @param {boolean} newValue - The new value of the raise hand status.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function _raiseHandUpdated({ dispatch, getState }, conference, participant, newValue) {
|
function _raiseHandUpdated({ dispatch, getState }, conference, participantId, newValue) {
|
||||||
const raisedHand = newValue === 'true';
|
const raisedHand = newValue === 'true';
|
||||||
|
const pid = participantId || getLocalParticipant(getState()).id;
|
||||||
|
|
||||||
dispatch(participantUpdated({
|
dispatch(participantUpdated({
|
||||||
conference,
|
conference,
|
||||||
id: participant.getId(),
|
id: pid,
|
||||||
raisedHand
|
raisedHand
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (raisedHand) {
|
if (raisedHand) {
|
||||||
dispatch(showNotification({
|
dispatch(showNotification({
|
||||||
titleArguments: {
|
titleArguments: {
|
||||||
name: getParticipantDisplayName(getState, participant.getId())
|
name: getParticipantDisplayName(getState, pid)
|
||||||
},
|
},
|
||||||
titleKey: 'notify.raisedHand'
|
titleKey: 'notify.raisedHand'
|
||||||
}, NOTIFICATION_TIMEOUT));
|
}, NOTIFICATION_TIMEOUT));
|
||||||
|
|
Loading…
Reference in New Issue