diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 79e49efb6a03..bc184ac2ab66 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -240,7 +240,7 @@ export default [ icon: Expensicons.Mail, successIcon: Expensicons.Checkmark, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat) => - type === CONTEXT_MENU_TYPES.REPORT_ACTION || (type === CONTEXT_MENU_TYPES.REPORT && !isUnreadChat), + !isUnreadChat && (type === CONTEXT_MENU_TYPES.REPORT_ACTION || type === CONTEXT_MENU_TYPES.REPORT), onPress: (closePopover, {reportAction, reportID}) => { Report.markCommentAsUnread(reportID, reportAction.created); if (closePopover) { diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 05e57c592b9f..0dbf41c513b1 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -124,6 +124,7 @@ function ReportActionItem(props) { const textInputRef = useRef(); const popoverAnchorRef = useRef(); const downloadedPreviews = useRef([]); + const isPinnedChat = lodashGet(props, 'report.isPinned', false); useEffect( () => () => { @@ -214,9 +215,11 @@ function ReportActionItem(props) { toggleContextMenuFromActiveReportAction, ReportUtils.isArchivedRoom(props.report), ReportUtils.chatIncludesChronos(props.report), + isPinnedChat, + props.shouldDisplayNewMarker, ); }, - [props.draftMessage, props.action, props.report, toggleContextMenuFromActiveReportAction], + [props.draftMessage, props.action, props.report, toggleContextMenuFromActiveReportAction, props.shouldDisplayNewMarker, isPinnedChat], ); const toggleReaction = useCallback( @@ -523,6 +526,8 @@ function ReportActionItem(props) { isVisible={hovered && !props.draftMessage && !hasErrors} draftMessage={props.draftMessage} isChronosReport={ReportUtils.chatIncludesChronos(props.report)} + isPinnedChat={isPinnedChat} + isUnreadChat={props.shouldDisplayNewMarker} />