@@ -45,7 +45,7 @@ import {
4545 shouldReportActionBeVisible ,
4646 wasMessageReceivedWhileOffline ,
4747} from '@libs/ReportActionsUtils' ;
48- import { canUserPerformWriteAction , chatIncludesChronosWithID , getReportLastVisibleActionCreated , isUnread } from '@libs/ReportUtils' ;
48+ import { canUserPerformWriteAction , chatIncludesChronosWithID , getOriginalReportID , getReportLastVisibleActionCreated , isUnread } from '@libs/ReportUtils' ;
4949import markOpenReportEnd from '@libs/Telemetry/markOpenReportEnd' ;
5050import { isTransactionPendingDelete } from '@libs/TransactionUtils' ;
5151import Visibility from '@libs/Visibility' ;
@@ -146,6 +146,8 @@ function MoneyRequestReportActionsList({
146146 const [ isUserValidated ] = useOnyx ( ONYXKEYS . ACCOUNT , { selector : ( account ) => account ?. validated , canBeMissing : true } ) ;
147147 const [ userBillingFundID ] = useOnyx ( ONYXKEYS . NVP_BILLING_FUND_ID , { canBeMissing : true } ) ;
148148 const personalDetails = usePersonalDetails ( ) ;
149+ const [ emojiReactions ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS_REACTIONS } ` , { canBeMissing : true } ) ;
150+ const [ draftMessage ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS_DRAFTS } ` , { canBeMissing : true } ) ;
149151
150152 const transactionsWithoutPendingDelete = useMemo ( ( ) => transactions . filter ( ( t ) => ! isTransactionPendingDelete ( t ) ) , [ transactions ] ) ;
151153 const mostRecentIOUReportActionID = useMemo ( ( ) => getMostRecentIOURequestActionID ( reportActions ) , [ reportActions ] ) ;
@@ -477,6 +479,12 @@ function MoneyRequestReportActionsList({
477479 ! isConsecutiveChronosAutomaticTimerAction ( visibleReportActions , index , chatIncludesChronosWithID ( reportAction ?. reportID ) ) &&
478480 hasNextActionMadeBySameActor ( visibleReportActions , index ) ;
479481
482+ const actionEmojiReactions = emojiReactions ?. [ `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS_REACTIONS } ${ reportAction . reportActionID } ` ] ;
483+ const originalReportID = getOriginalReportID ( report . reportID , reportAction ) ;
484+ const reportDraftMessages = draftMessage ?. [ `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS_DRAFTS } ${ originalReportID } ` ] ;
485+ const matchingDraftMessage = reportDraftMessages ?. [ reportAction . reportActionID ] ;
486+ const matchingDraftMessageString = typeof matchingDraftMessage === 'string' ? matchingDraftMessage : matchingDraftMessage ?. message ;
487+
480488 return (
481489 < ReportActionsListItemRenderer
482490 allReports = { allReports }
@@ -499,6 +507,8 @@ function MoneyRequestReportActionsList({
499507 isUserValidated = { isUserValidated }
500508 personalDetails = { personalDetails }
501509 userBillingFundID = { userBillingFundID }
510+ emojiReactions = { actionEmojiReactions }
511+ draftMessage = { matchingDraftMessageString }
502512 />
503513 ) ;
504514 } ,
@@ -518,6 +528,8 @@ function MoneyRequestReportActionsList({
518528 isUserValidated ,
519529 personalDetails ,
520530 userBillingFundID ,
531+ emojiReactions ,
532+ draftMessage ,
521533 ] ,
522534 ) ;
523535
0 commit comments