@@ -4,10 +4,9 @@ import {deepEqual} from 'fast-equals';
44import mapValues from 'lodash/mapValues' ;
55import React , { memo , use , useCallback , useContext , useEffect , useMemo , useRef , useState } from 'react' ;
66import type { GestureResponderEvent , TextInput } from 'react-native' ;
7- import { InteractionManager , Keyboard , View } from 'react-native' ;
7+ import { Keyboard , View } from 'react-native' ;
88import type { OnyxEntry } from 'react-native-onyx' ;
99import type { ValueOf } from 'type-fest' ;
10- import type { Emoji } from '@assets/emojis/types' ;
1110import * as ActionSheetAwareScrollView from '@components/ActionSheetAwareScrollView' ;
1211import Button from '@components/Button' ;
1312import DisplayNames from '@components/DisplayNames' ;
@@ -128,7 +127,6 @@ import {openPersonalBankAccountSetupView} from '@userActions/BankAccounts';
128127import type { IgnoreDirection } from '@userActions/ClearReportActionErrors' ;
129128import { hideEmojiPicker , isActive } from '@userActions/EmojiPickerAction' ;
130129import { createTransactionThreadReport , expandURLPreview } from '@userActions/Report' ;
131- import { isAnonymousUser , signOutAndRedirectToSignIn } from '@userActions/Session' ;
132130import CONST from '@src/CONST' ;
133131import ONYXKEYS from '@src/ONYXKEYS' ;
134132import ROUTES from '@src/ROUTES' ;
@@ -239,9 +237,6 @@ type PureReportActionItemProps = {
239237 /** The iou report associated with the linked report, if any */
240238 iouReportOfLinkedReport : OnyxEntry < OnyxTypes . Report > ;
241239
242- /** All the emoji reactions for the report action. */
243- emojiReactions ?: OnyxTypes . ReportActionReactions ;
244-
245240 /** Linked transaction route error */
246241 linkedTransactionRouteError ?: Errors ;
247242
@@ -269,17 +264,6 @@ type PureReportActionItemProps = {
269264 /** Whether the room is a chronos report */
270265 isChronosReport ?: boolean ;
271266
272- /** Function to toggle emoji reaction */
273- toggleEmojiReaction ?: (
274- reportID : string | undefined ,
275- reportAction : OnyxTypes . ReportAction ,
276- reactionObject : Emoji ,
277- existingReactions : OnyxEntry < OnyxTypes . ReportActionReactions > ,
278- paramSkinTone : number ,
279- currentUserAccountID : number ,
280- ignoreSkinToneOnCompare : boolean | undefined ,
281- ) => void ;
282-
283267 /** Function to resolve actionable report mention whisper */
284268 resolveActionableReportMentionWhisper ?: (
285269 report : OnyxEntry < OnyxTypes . Report > ,
@@ -332,9 +316,6 @@ type PureReportActionItemProps = {
332316 /** Did the user dismiss trying out NewDot? If true, it means they prefer using OldDot */
333317 isTryNewDotNVPDismissed ?: boolean ;
334318
335- /** Current user's account id */
336- currentUserAccountID : number ;
337-
338319 /** The bank account list */
339320 bankAccountList ?: OnyxTypes . BankAccountList | undefined ;
340321
@@ -379,7 +360,6 @@ function PureReportActionItem({
379360 taskReport,
380361 linkedReport,
381362 iouReportOfLinkedReport,
382- emojiReactions,
383363 linkedTransactionRouteError,
384364 isUserValidated,
385365 parentReport,
@@ -389,7 +369,6 @@ function PureReportActionItem({
389369 deleteReportActionDraft = ( ) => { } ,
390370 isArchivedRoom,
391371 isChronosReport,
392- toggleEmojiReaction = ( ) => { } ,
393372 resolveActionableReportMentionWhisper = ( ) => { } ,
394373 resolveActionableMentionWhisper = ( ) => { } ,
395374 isClosedExpenseReportWithNoExpenses,
@@ -402,7 +381,6 @@ function PureReportActionItem({
402381 shouldShowBorder,
403382 shouldHighlight = false ,
404383 isTryNewDotNVPDismissed = false ,
405- currentUserAccountID,
406384 bankAccountList,
407385 reportNameValuePairsOrigin,
408386 reportNameValuePairsOriginalID,
@@ -684,13 +662,6 @@ function PureReportActionItem({
684662 ] ,
685663 ) ;
686664
687- const toggleReaction = useCallback (
688- ( emoji : Emoji , preferredSkinTone : number , ignoreSkinToneOnCompare ?: boolean ) => {
689- toggleEmojiReaction ( reportID , action , emoji , emojiReactions , preferredSkinTone , currentUserAccountID , ignoreSkinToneOnCompare ) ;
690- } ,
691- [ reportID , action , emojiReactions , toggleEmojiReaction , currentUserAccountID ] ,
692- ) ;
693-
694665 const contextMenuStateValue = useMemo (
695666 ( ) => ( {
696667 anchor : popoverAnchorRef . current ,
@@ -1140,24 +1111,12 @@ function PureReportActionItem({
11401111 < LinkPreviewer linkMetadata = { action . linkMetadata ?. filter ( ( item ) => ! isEmptyObject ( item ) ) } />
11411112 </ View >
11421113 ) }
1143- { ! isMessageDeleted ( action ) && (
1114+ { ! isOnSearch && ! isMessageDeleted ( action ) && (
11441115 < View style = { draftMessageRightAlign } >
11451116 < ReportActionItemEmojiReactions
11461117 reportAction = { action }
1147- emojiReactions = { isOnSearch ? { } : emojiReactions }
1118+ reportID = { reportID }
11481119 shouldBlockReactions = { hasErrors }
1149- toggleReaction = { ( emoji , preferredSkinTone , ignoreSkinToneOnCompare ) => {
1150- if ( isAnonymousUser ( ) ) {
1151- hideContextMenu ( false ) ;
1152-
1153- // eslint-disable-next-line @typescript-eslint/no-deprecated
1154- InteractionManager . runAfterInteractions ( ( ) => {
1155- signOutAndRedirectToSignIn ( ) ;
1156- } ) ;
1157- } else {
1158- toggleReaction ( emoji , preferredSkinTone , ignoreSkinToneOnCompare ) ;
1159- }
1160- } }
11611120 setIsEmojiPickerActive = { setIsEmojiPickerActive }
11621121 />
11631122 </ View >
@@ -1473,7 +1432,6 @@ export default memo(PureReportActionItem, (prevProps, nextProps) => {
14731432 deepEqual ( prevParentReportAction , nextParentReportAction ) &&
14741433 prevProps . draftMessage === nextProps . draftMessage &&
14751434 prevProps . iouReport ?. reportID === nextProps . iouReport ?. reportID &&
1476- deepEqual ( prevProps . emojiReactions , nextProps . emojiReactions ) &&
14771435 deepEqual ( prevProps . linkedTransactionRouteError , nextProps . linkedTransactionRouteError ) &&
14781436 prevProps . isUserValidated === nextProps . isUserValidated &&
14791437 prevProps . parentReport ?. reportID === nextProps . parentReport ?. reportID &&
0 commit comments