Enable calling reactions
This commit is contained in:
parent
c531c64410
commit
4c4ab306eb
6 changed files with 14 additions and 34 deletions
|
@ -74,7 +74,6 @@ const createProps = (storyProps: Partial<PropsType> = {}): PropsType => ({
|
|||
incomingCall: null,
|
||||
callLink: undefined,
|
||||
isGroupCallRaiseHandEnabled: true,
|
||||
isGroupCallReactionsEnabled: true,
|
||||
me: {
|
||||
...getDefaultConversation({
|
||||
color: AvatarColors[0],
|
||||
|
|
|
@ -101,7 +101,6 @@ export type PropsType = {
|
|||
hasInitialLoadCompleted: boolean;
|
||||
i18n: LocalizerType;
|
||||
isGroupCallRaiseHandEnabled: boolean;
|
||||
isGroupCallReactionsEnabled: boolean;
|
||||
me: ConversationType;
|
||||
notifyForCall: (
|
||||
conversationId: string,
|
||||
|
@ -160,7 +159,6 @@ function ActiveCallManager({
|
|||
hangUpActiveCall,
|
||||
i18n,
|
||||
isGroupCallRaiseHandEnabled,
|
||||
isGroupCallReactionsEnabled,
|
||||
getGroupCallVideoFrameSource,
|
||||
getPresentingSources,
|
||||
me,
|
||||
|
@ -405,7 +403,6 @@ function ActiveCallManager({
|
|||
hangUpActiveCall={hangUpActiveCall}
|
||||
i18n={i18n}
|
||||
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
|
||||
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled}
|
||||
me={me}
|
||||
openSystemPreferencesAction={openSystemPreferencesAction}
|
||||
renderEmojiPicker={renderEmojiPicker}
|
||||
|
@ -477,7 +474,6 @@ export function CallManager({
|
|||
incomingCall,
|
||||
isConversationTooBigToRing,
|
||||
isGroupCallRaiseHandEnabled,
|
||||
isGroupCallReactionsEnabled,
|
||||
me,
|
||||
notifyForCall,
|
||||
openSystemPreferencesAction,
|
||||
|
@ -565,7 +561,6 @@ export function CallManager({
|
|||
hangUpActiveCall={hangUpActiveCall}
|
||||
i18n={i18n}
|
||||
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
|
||||
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled}
|
||||
me={me}
|
||||
openSystemPreferencesAction={openSystemPreferencesAction}
|
||||
pauseVoiceNotePlayer={pauseVoiceNotePlayer}
|
||||
|
|
|
@ -187,7 +187,6 @@ const createProps = (
|
|||
hangUpActiveCall: action('hang-up'),
|
||||
i18n,
|
||||
isGroupCallRaiseHandEnabled: true,
|
||||
isGroupCallReactionsEnabled: true,
|
||||
me: getDefaultConversation({
|
||||
color: AvatarColors[1],
|
||||
id: '6146087e-f7ef-457e-9a8d-47df1fdd6b25',
|
||||
|
|
|
@ -97,7 +97,6 @@ export type PropsType = {
|
|||
hangUpActiveCall: (reason: string) => void;
|
||||
i18n: LocalizerType;
|
||||
isGroupCallRaiseHandEnabled: boolean;
|
||||
isGroupCallReactionsEnabled: boolean;
|
||||
me: ConversationType;
|
||||
openSystemPreferencesAction: () => unknown;
|
||||
renderReactionPicker: (
|
||||
|
@ -186,7 +185,6 @@ export function CallScreen({
|
|||
hangUpActiveCall,
|
||||
i18n,
|
||||
isGroupCallRaiseHandEnabled,
|
||||
isGroupCallReactionsEnabled,
|
||||
me,
|
||||
openSystemPreferencesAction,
|
||||
renderEmojiPicker,
|
||||
|
@ -851,20 +849,19 @@ export function CallScreen({
|
|||
className="CallControls__ReactionPickerContainer"
|
||||
ref={reactionPickerContainerRef}
|
||||
>
|
||||
{isGroupCallReactionsEnabled &&
|
||||
renderReactionPicker({
|
||||
ref: reactionPickerRef,
|
||||
onClose: () => setShowReactionPicker(false),
|
||||
onPick: emoji => {
|
||||
setShowReactionPicker(false);
|
||||
sendGroupCallReaction({
|
||||
callMode: activeCall.callMode,
|
||||
conversationId: conversation.id,
|
||||
value: emoji,
|
||||
});
|
||||
},
|
||||
renderEmojiPicker,
|
||||
})}
|
||||
{renderReactionPicker({
|
||||
ref: reactionPickerRef,
|
||||
onClose: () => setShowReactionPicker(false),
|
||||
onPick: emoji => {
|
||||
setShowReactionPicker(false);
|
||||
sendGroupCallReaction({
|
||||
callMode: activeCall.callMode,
|
||||
conversationId: conversation.id,
|
||||
value: emoji,
|
||||
});
|
||||
},
|
||||
renderEmojiPicker,
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
@ -903,7 +900,7 @@ export function CallScreen({
|
|||
onClick={togglePresenting}
|
||||
tooltipDirection={TooltipPlacement.Top}
|
||||
/>
|
||||
{isGroupCallReactionsEnabled && reactButtonType && (
|
||||
{reactButtonType && (
|
||||
<div
|
||||
className={classNames('CallControls__ReactButtonContainer', {
|
||||
'CallControls__ReactButtonContainer--menu-shown':
|
||||
|
|
|
@ -38,7 +38,6 @@ import { strictAssert } from '../../util/assert';
|
|||
import { callLinkToConversation } from '../../util/callLinks';
|
||||
import { callingTones } from '../../util/callingTones';
|
||||
import { isGroupCallRaiseHandEnabled } from '../../util/isGroupCallRaiseHandEnabled';
|
||||
import { isGroupCallReactionsEnabled } from '../../util/isGroupCallReactionsEnabled';
|
||||
import { missingCaseError } from '../../util/missingCaseError';
|
||||
import { useAudioPlayerActions } from '../ducks/audioPlayer';
|
||||
import { getActiveCall, useCallingActions } from '../ducks/calling';
|
||||
|
@ -457,7 +456,6 @@ export const SmartCallManager = memo(function SmartCallManager() {
|
|||
incomingCall={incomingCall}
|
||||
isConversationTooBigToRing={isConversationTooBigToRing}
|
||||
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled()}
|
||||
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled()}
|
||||
me={me}
|
||||
notifyForCall={notifyForCall}
|
||||
openSystemPreferencesAction={openSystemPreferencesAction}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as RemoteConfig from '../RemoteConfig';
|
||||
|
||||
export function isGroupCallReactionsEnabled(): boolean {
|
||||
return Boolean(RemoteConfig.isEnabled('desktop.internalUser'));
|
||||
}
|
Loading…
Add table
Reference in a new issue