Restore call reactions click outside to dismiss
This commit is contained in:
parent
36c834ea26
commit
7065ef0885
1 changed files with 17 additions and 0 deletions
|
@ -71,6 +71,7 @@ import {
|
||||||
PersistentCallingToast,
|
PersistentCallingToast,
|
||||||
useCallingToasts,
|
useCallingToasts,
|
||||||
} from './CallingToast';
|
} from './CallingToast';
|
||||||
|
import { handleOutsideClick } from '../util/handleOutsideClick';
|
||||||
import { Spinner } from './Spinner';
|
import { Spinner } from './Spinner';
|
||||||
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker';
|
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker';
|
||||||
import type { SmartReactionPicker } from '../state/smart/ReactionPicker';
|
import type { SmartReactionPicker } from '../state/smart/ReactionPicker';
|
||||||
|
@ -328,6 +329,22 @@ export function CallScreen({
|
||||||
};
|
};
|
||||||
}, [toggleAudio, toggleVideo]);
|
}, [toggleAudio, toggleVideo]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!showReactionPicker) {
|
||||||
|
return noop;
|
||||||
|
}
|
||||||
|
return handleOutsideClick(
|
||||||
|
() => {
|
||||||
|
setShowReactionPicker(false);
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
containerElements: [reactButtonRef, reactionPickerContainerRef],
|
||||||
|
name: 'CallScreen.reactionPicker',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}, [showReactionPicker]);
|
||||||
|
|
||||||
useScreenSharingStoppedToast({ activeCall, i18n });
|
useScreenSharingStoppedToast({ activeCall, i18n });
|
||||||
useViewModeChangedToast({ activeCall, i18n });
|
useViewModeChangedToast({ activeCall, i18n });
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue