diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 9c374b130a1b..0b2565f122d7 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -375,6 +375,7 @@ function ReportActionItem(props) { mostRecentReply={`${props.action.childLastVisibleActionCreated}`} isHovered={hovered} icons={ReportUtils.getIconsForParticipants(oldestFourAccountIDs, props.personalDetailsList)} + onSecondaryInteraction={showPopover} /> )} diff --git a/src/pages/home/report/ReportActionItemThread.js b/src/pages/home/report/ReportActionItemThread.js index d4d0b78d4de1..ebd965e80daf 100644 --- a/src/pages/home/report/ReportActionItemThread.js +++ b/src/pages/home/report/ReportActionItemThread.js @@ -9,7 +9,7 @@ import CONST from '../../../CONST'; import avatarPropTypes from '../../../components/avatarPropTypes'; import MultipleAvatars from '../../../components/MultipleAvatars'; import compose from '../../../libs/compose'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; +import PressableWithSecondaryInteraction from '../../../components/PressableWithSecondaryInteraction'; const propTypes = { /** List of participant icons for the thread */ @@ -27,6 +27,9 @@ const propTypes = { /** Whether the thread item / message is being hovered */ isHovered: PropTypes.bool.isRequired, + /** The function that should be called when the thread is LongPressed or right-clicked */ + onSecondaryInteraction: PropTypes.func.isRequired, + ...withLocalizePropTypes, ...windowDimensionsPropTypes, }; @@ -39,12 +42,13 @@ function ReportActionItemThread(props) { return ( - { Report.navigateToAndOpenChildReport(props.childReportID); }} accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON} accessibilityLabel={`${props.numberOfReplies} ${replyText}`} + onSecondaryInteraction={props.onSecondaryInteraction} > - + ); }