mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Restore call reactions click outside to dismiss
This commit is contained in:
@@ -71,6 +71,7 @@ import {
|
||||
PersistentCallingToast,
|
||||
useCallingToasts,
|
||||
} from './CallingToast';
|
||||
import { handleOutsideClick } from '../util/handleOutsideClick';
|
||||
import { Spinner } from './Spinner';
|
||||
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker';
|
||||
import type { SmartReactionPicker } from '../state/smart/ReactionPicker';
|
||||
@@ -328,6 +329,22 @@ export function CallScreen({
|
||||
};
|
||||
}, [toggleAudio, toggleVideo]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!showReactionPicker) {
|
||||
return noop;
|
||||
}
|
||||
return handleOutsideClick(
|
||||
() => {
|
||||
setShowReactionPicker(false);
|
||||
return true;
|
||||
},
|
||||
{
|
||||
containerElements: [reactButtonRef, reactionPickerContainerRef],
|
||||
name: 'CallScreen.reactionPicker',
|
||||
}
|
||||
);
|
||||
}, [showReactionPicker]);
|
||||
|
||||
useScreenSharingStoppedToast({ activeCall, i18n });
|
||||
useViewModeChangedToast({ activeCall, i18n });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user