fix(raise-hand) Fix multiple raise hand from notification (#11586)
Only dispatch raise hand if hand was not already raised
This commit is contained in:
parent
ad70f12cb4
commit
9dba1d30b0
|
@ -80,6 +80,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
||||||
let descriptionKey;
|
let descriptionKey;
|
||||||
let titleKey;
|
let titleKey;
|
||||||
let uid;
|
let uid;
|
||||||
|
const localParticipant = getLocalParticipant(getState);
|
||||||
|
const raisedHand = hasRaisedHand(localParticipant);
|
||||||
|
|
||||||
switch (action.mediaType) {
|
switch (action.mediaType) {
|
||||||
case MEDIA_TYPE.AUDIO: {
|
case MEDIA_TYPE.AUDIO: {
|
||||||
|
@ -102,7 +104,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
||||||
dispatch(showNotification({
|
dispatch(showNotification({
|
||||||
customActionNameKey: [ 'notify.raiseHandAction' ],
|
customActionNameKey: [ 'notify.raiseHandAction' ],
|
||||||
customActionHandler: [ () => batch(() => {
|
customActionHandler: [ () => batch(() => {
|
||||||
dispatch(raiseHand(true));
|
!raisedHand && dispatch(raiseHand(true));
|
||||||
dispatch(hideNotification(uid));
|
dispatch(hideNotification(uid));
|
||||||
}) ],
|
}) ],
|
||||||
descriptionKey,
|
descriptionKey,
|
||||||
|
|
Loading…
Reference in New Issue