Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(conference) clear raised hands when conference changes #13942

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions react/features/base/participants/actionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ export const SET_LOADABLE_AVATAR_URL = 'SET_LOADABLE_AVATAR_URL';
*/
export const LOCAL_PARTICIPANT_RAISE_HAND = 'LOCAL_PARTICIPANT_RAISE_HAND';

/**
* Clear the raise hand queue.
* {
* type: RAISE_HAND_CLEAR
* }
*/
export const RAISE_HAND_CLEAR = 'RAISE_HAND_CLEAR';

/**
* Updates participant in raise hand queue.
* {
Expand Down
14 changes: 14 additions & 0 deletions react/features/base/participants/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
PARTICIPANT_SOURCES_UPDATED,
PARTICIPANT_UPDATED,
PIN_PARTICIPANT,
RAISE_HAND_CLEAR,
RAISE_HAND_UPDATED,
SCREENSHARE_PARTICIPANT_NAME_CHANGED,
SET_LOADABLE_AVATAR_URL,
Expand Down Expand Up @@ -629,6 +630,19 @@ export function raiseHand(enabled: boolean) {
};
}

/**
* Clear the raise hand queue.
*
* @returns {{
* type: RAISE_HAND_CLEAR
* }}
*/
export function raiseHandClear() {
return {
type: RAISE_HAND_CLEAR
};
}

/**
* Update raise hand queue of participants.
*
Expand Down
7 changes: 7 additions & 0 deletions react/features/base/participants/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
PARTICIPANT_SOURCES_UPDATED,
PARTICIPANT_UPDATED,
PIN_PARTICIPANT,
RAISE_HAND_CLEAR,
RAISE_HAND_UPDATED,
SCREENSHARE_PARTICIPANT_NAME_CHANGED,
SET_LOADABLE_AVATAR_URL
Expand Down Expand Up @@ -465,6 +466,12 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',

return { ...state };
}
case RAISE_HAND_CLEAR: {
return {
...state,
raisedHandsQueue: []
};
}
case RAISE_HAND_UPDATED: {
return {
...state,
Expand Down
5 changes: 4 additions & 1 deletion react/features/conference/middleware.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getLocalizedDateFormatter } from '../base/i18n/dateUtil';
import { translateToHTML } from '../base/i18n/functions';
import i18next from '../base/i18n/i18next';
import { browser } from '../base/lib-jitsi-meet';
import { pinParticipant } from '../base/participants/actions';
import { pinParticipant, raiseHandClear } from '../base/participants/actions';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import StateListenerRegistry from '../base/redux/StateListenerRegistry';
import { SET_REDUCED_UI } from '../base/responsive-ui/actionTypes';
Expand Down Expand Up @@ -90,6 +90,9 @@ StateListenerRegistry.register(
// remaining pinned, since it's not destroyed across runs.
dispatch(pinParticipant(null));

// Clear raised hands.
dispatch(raiseHandClear());

// XXX I wonder if there is a better way to do this. At this stage
// we do know what dialogs we want to keep but the list of those
// we want to hide is a lot longer. Thus we take a bit of a shortcut
Expand Down