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,
|
incomingCall: null,
|
||||||
callLink: undefined,
|
callLink: undefined,
|
||||||
isGroupCallRaiseHandEnabled: true,
|
isGroupCallRaiseHandEnabled: true,
|
||||||
isGroupCallReactionsEnabled: true,
|
|
||||||
me: {
|
me: {
|
||||||
...getDefaultConversation({
|
...getDefaultConversation({
|
||||||
color: AvatarColors[0],
|
color: AvatarColors[0],
|
||||||
|
|
|
@ -101,7 +101,6 @@ export type PropsType = {
|
||||||
hasInitialLoadCompleted: boolean;
|
hasInitialLoadCompleted: boolean;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isGroupCallRaiseHandEnabled: boolean;
|
isGroupCallRaiseHandEnabled: boolean;
|
||||||
isGroupCallReactionsEnabled: boolean;
|
|
||||||
me: ConversationType;
|
me: ConversationType;
|
||||||
notifyForCall: (
|
notifyForCall: (
|
||||||
conversationId: string,
|
conversationId: string,
|
||||||
|
@ -160,7 +159,6 @@ function ActiveCallManager({
|
||||||
hangUpActiveCall,
|
hangUpActiveCall,
|
||||||
i18n,
|
i18n,
|
||||||
isGroupCallRaiseHandEnabled,
|
isGroupCallRaiseHandEnabled,
|
||||||
isGroupCallReactionsEnabled,
|
|
||||||
getGroupCallVideoFrameSource,
|
getGroupCallVideoFrameSource,
|
||||||
getPresentingSources,
|
getPresentingSources,
|
||||||
me,
|
me,
|
||||||
|
@ -405,7 +403,6 @@ function ActiveCallManager({
|
||||||
hangUpActiveCall={hangUpActiveCall}
|
hangUpActiveCall={hangUpActiveCall}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
|
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
|
||||||
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled}
|
|
||||||
me={me}
|
me={me}
|
||||||
openSystemPreferencesAction={openSystemPreferencesAction}
|
openSystemPreferencesAction={openSystemPreferencesAction}
|
||||||
renderEmojiPicker={renderEmojiPicker}
|
renderEmojiPicker={renderEmojiPicker}
|
||||||
|
@ -477,7 +474,6 @@ export function CallManager({
|
||||||
incomingCall,
|
incomingCall,
|
||||||
isConversationTooBigToRing,
|
isConversationTooBigToRing,
|
||||||
isGroupCallRaiseHandEnabled,
|
isGroupCallRaiseHandEnabled,
|
||||||
isGroupCallReactionsEnabled,
|
|
||||||
me,
|
me,
|
||||||
notifyForCall,
|
notifyForCall,
|
||||||
openSystemPreferencesAction,
|
openSystemPreferencesAction,
|
||||||
|
@ -565,7 +561,6 @@ export function CallManager({
|
||||||
hangUpActiveCall={hangUpActiveCall}
|
hangUpActiveCall={hangUpActiveCall}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
|
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
|
||||||
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled}
|
|
||||||
me={me}
|
me={me}
|
||||||
openSystemPreferencesAction={openSystemPreferencesAction}
|
openSystemPreferencesAction={openSystemPreferencesAction}
|
||||||
pauseVoiceNotePlayer={pauseVoiceNotePlayer}
|
pauseVoiceNotePlayer={pauseVoiceNotePlayer}
|
||||||
|
|
|
@ -187,7 +187,6 @@ const createProps = (
|
||||||
hangUpActiveCall: action('hang-up'),
|
hangUpActiveCall: action('hang-up'),
|
||||||
i18n,
|
i18n,
|
||||||
isGroupCallRaiseHandEnabled: true,
|
isGroupCallRaiseHandEnabled: true,
|
||||||
isGroupCallReactionsEnabled: true,
|
|
||||||
me: getDefaultConversation({
|
me: getDefaultConversation({
|
||||||
color: AvatarColors[1],
|
color: AvatarColors[1],
|
||||||
id: '6146087e-f7ef-457e-9a8d-47df1fdd6b25',
|
id: '6146087e-f7ef-457e-9a8d-47df1fdd6b25',
|
||||||
|
|
|
@ -97,7 +97,6 @@ export type PropsType = {
|
||||||
hangUpActiveCall: (reason: string) => void;
|
hangUpActiveCall: (reason: string) => void;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isGroupCallRaiseHandEnabled: boolean;
|
isGroupCallRaiseHandEnabled: boolean;
|
||||||
isGroupCallReactionsEnabled: boolean;
|
|
||||||
me: ConversationType;
|
me: ConversationType;
|
||||||
openSystemPreferencesAction: () => unknown;
|
openSystemPreferencesAction: () => unknown;
|
||||||
renderReactionPicker: (
|
renderReactionPicker: (
|
||||||
|
@ -186,7 +185,6 @@ export function CallScreen({
|
||||||
hangUpActiveCall,
|
hangUpActiveCall,
|
||||||
i18n,
|
i18n,
|
||||||
isGroupCallRaiseHandEnabled,
|
isGroupCallRaiseHandEnabled,
|
||||||
isGroupCallReactionsEnabled,
|
|
||||||
me,
|
me,
|
||||||
openSystemPreferencesAction,
|
openSystemPreferencesAction,
|
||||||
renderEmojiPicker,
|
renderEmojiPicker,
|
||||||
|
@ -851,8 +849,7 @@ export function CallScreen({
|
||||||
className="CallControls__ReactionPickerContainer"
|
className="CallControls__ReactionPickerContainer"
|
||||||
ref={reactionPickerContainerRef}
|
ref={reactionPickerContainerRef}
|
||||||
>
|
>
|
||||||
{isGroupCallReactionsEnabled &&
|
{renderReactionPicker({
|
||||||
renderReactionPicker({
|
|
||||||
ref: reactionPickerRef,
|
ref: reactionPickerRef,
|
||||||
onClose: () => setShowReactionPicker(false),
|
onClose: () => setShowReactionPicker(false),
|
||||||
onPick: emoji => {
|
onPick: emoji => {
|
||||||
|
@ -903,7 +900,7 @@ export function CallScreen({
|
||||||
onClick={togglePresenting}
|
onClick={togglePresenting}
|
||||||
tooltipDirection={TooltipPlacement.Top}
|
tooltipDirection={TooltipPlacement.Top}
|
||||||
/>
|
/>
|
||||||
{isGroupCallReactionsEnabled && reactButtonType && (
|
{reactButtonType && (
|
||||||
<div
|
<div
|
||||||
className={classNames('CallControls__ReactButtonContainer', {
|
className={classNames('CallControls__ReactButtonContainer', {
|
||||||
'CallControls__ReactButtonContainer--menu-shown':
|
'CallControls__ReactButtonContainer--menu-shown':
|
||||||
|
|
|
@ -38,7 +38,6 @@ import { strictAssert } from '../../util/assert';
|
||||||
import { callLinkToConversation } from '../../util/callLinks';
|
import { callLinkToConversation } from '../../util/callLinks';
|
||||||
import { callingTones } from '../../util/callingTones';
|
import { callingTones } from '../../util/callingTones';
|
||||||
import { isGroupCallRaiseHandEnabled } from '../../util/isGroupCallRaiseHandEnabled';
|
import { isGroupCallRaiseHandEnabled } from '../../util/isGroupCallRaiseHandEnabled';
|
||||||
import { isGroupCallReactionsEnabled } from '../../util/isGroupCallReactionsEnabled';
|
|
||||||
import { missingCaseError } from '../../util/missingCaseError';
|
import { missingCaseError } from '../../util/missingCaseError';
|
||||||
import { useAudioPlayerActions } from '../ducks/audioPlayer';
|
import { useAudioPlayerActions } from '../ducks/audioPlayer';
|
||||||
import { getActiveCall, useCallingActions } from '../ducks/calling';
|
import { getActiveCall, useCallingActions } from '../ducks/calling';
|
||||||
|
@ -457,7 +456,6 @@ export const SmartCallManager = memo(function SmartCallManager() {
|
||||||
incomingCall={incomingCall}
|
incomingCall={incomingCall}
|
||||||
isConversationTooBigToRing={isConversationTooBigToRing}
|
isConversationTooBigToRing={isConversationTooBigToRing}
|
||||||
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled()}
|
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled()}
|
||||||
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled()}
|
|
||||||
me={me}
|
me={me}
|
||||||
notifyForCall={notifyForCall}
|
notifyForCall={notifyForCall}
|
||||||
openSystemPreferencesAction={openSystemPreferencesAction}
|
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