fix(shortcuts) toggle value based on current state (#13685)

pull/13689/head jitsi-meet_8886
Mihaela Dumitru 2 years ago committed by GitHub
parent 5dfd02151e
commit c9d907e3fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      react/features/toolbox/hooks.web.ts

@ -42,9 +42,8 @@ export const useKeyboardShortcuts = (toolbarButtons: Array<string>) => {
const desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled();
const fullScreen = useSelector((state: IReduxState) => state['features/toolbox'].fullScreen);
const gifsEnabled = useSelector(isGifEnabled);
const localParticipant = useSelector(getLocalParticipant);
const participantsPaneOpen = useSelector(getParticipantsPaneOpen);
const raisedHand = hasRaisedHand(localParticipant);
const raisedHand = useSelector((state: IReduxState) => hasRaisedHand(getLocalParticipant(state)));
const reactionsEnabled = useSelector(isReactionsEnabled);
const screenSharing = useSelector(isScreenVideoShared);
const tileViewEnabled = useSelector(shouldDisplayTileView);
@ -306,5 +305,15 @@ export const useKeyboardShortcuts = (toolbarButtons: Array<string>) => {
dispatch(unregisterShortcut(letter, true)));
}
};
}, []);
}, [
chatOpen,
desktopSharingButtonDisabled,
desktopSharingEnabled,
fullScreen,
gifsEnabled,
participantsPaneOpen,
raisedHand,
screenSharing,
tileViewEnabled
]);
};

Loading…
Cancel
Save