Skip to content

Commit

Permalink
Enable calling reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ayumi-signal committed Apr 29, 2024
1 parent c531c64 commit 4c4ab30
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 34 deletions.
1 change: 0 additions & 1 deletion ts/components/CallManager.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ const createProps = (storyProps: Partial<PropsType> = {}): PropsType => ({
incomingCall: null,
callLink: undefined,
isGroupCallRaiseHandEnabled: true,
isGroupCallReactionsEnabled: true,
me: {
...getDefaultConversation({
color: AvatarColors[0],
Expand Down
5 changes: 0 additions & 5 deletions ts/components/CallManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export type PropsType = {
hasInitialLoadCompleted: boolean;
i18n: LocalizerType;
isGroupCallRaiseHandEnabled: boolean;
isGroupCallReactionsEnabled: boolean;
me: ConversationType;
notifyForCall: (
conversationId: string,
Expand Down Expand Up @@ -160,7 +159,6 @@ function ActiveCallManager({
hangUpActiveCall,
i18n,
isGroupCallRaiseHandEnabled,
isGroupCallReactionsEnabled,
getGroupCallVideoFrameSource,
getPresentingSources,
me,
Expand Down Expand Up @@ -405,7 +403,6 @@ function ActiveCallManager({
hangUpActiveCall={hangUpActiveCall}
i18n={i18n}
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled}
me={me}
openSystemPreferencesAction={openSystemPreferencesAction}
renderEmojiPicker={renderEmojiPicker}
Expand Down Expand Up @@ -477,7 +474,6 @@ export function CallManager({
incomingCall,
isConversationTooBigToRing,
isGroupCallRaiseHandEnabled,
isGroupCallReactionsEnabled,
me,
notifyForCall,
openSystemPreferencesAction,
Expand Down Expand Up @@ -565,7 +561,6 @@ export function CallManager({
hangUpActiveCall={hangUpActiveCall}
i18n={i18n}
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled}
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled}
me={me}
openSystemPreferencesAction={openSystemPreferencesAction}
pauseVoiceNotePlayer={pauseVoiceNotePlayer}
Expand Down
1 change: 0 additions & 1 deletion ts/components/CallScreen.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
31 changes: 14 additions & 17 deletions ts/components/CallScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export type PropsType = {
hangUpActiveCall: (reason: string) => void;
i18n: LocalizerType;
isGroupCallRaiseHandEnabled: boolean;
isGroupCallReactionsEnabled: boolean;
me: ConversationType;
openSystemPreferencesAction: () => unknown;
renderReactionPicker: (
Expand Down Expand Up @@ -186,7 +185,6 @@ export function CallScreen({
hangUpActiveCall,
i18n,
isGroupCallRaiseHandEnabled,
isGroupCallReactionsEnabled,
me,
openSystemPreferencesAction,
renderEmojiPicker,
Expand Down Expand Up @@ -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>
)}

Expand Down Expand Up @@ -903,7 +900,7 @@ export function CallScreen({
onClick={togglePresenting}
tooltipDirection={TooltipPlacement.Top}
/>
{isGroupCallReactionsEnabled && reactButtonType && (
{reactButtonType && (
<div
className={classNames('CallControls__ReactButtonContainer', {
'CallControls__ReactButtonContainer--menu-shown':
Expand Down
2 changes: 0 additions & 2 deletions ts/state/smart/CallManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -457,7 +456,6 @@ export const SmartCallManager = memo(function SmartCallManager() {
incomingCall={incomingCall}
isConversationTooBigToRing={isConversationTooBigToRing}
isGroupCallRaiseHandEnabled={isGroupCallRaiseHandEnabled()}
isGroupCallReactionsEnabled={isGroupCallReactionsEnabled()}
me={me}
notifyForCall={notifyForCall}
openSystemPreferencesAction={openSystemPreferencesAction}
Expand Down
8 changes: 0 additions & 8 deletions ts/util/isGroupCallReactionsEnabled.ts

This file was deleted.

0 comments on commit 4c4ab30

Please sign in to comment.