From 38e656ced21bab4994aa94b78bac741bbdb00626 Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Thu, 1 Feb 2024 17:09:42 +0100 Subject: [PATCH 1/3] Remove the "Leave thread" option from the context menu --- .../report/ContextMenu/ContextMenuActions.tsx | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index ffa6c0adf3b8..58e0794d796d 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -301,38 +301,6 @@ const ContextMenuActions: ContextMenuAction[] = [ }, getDescription: () => {}, }, - { - isAnonymousAction: false, - textTranslateKey: 'reportActionContextMenu.leaveThread', - icon: Expensicons.BellSlash, - shouldShow: (type, reportAction, isArchivedRoom, betas, menuTarget, isChronosReport, reportID) => { - const childReportNotificationPreference = ReportUtils.getChildReportNotificationPreference(reportAction); - const isDeletedAction = ReportActionsUtils.isDeletedAction(reportAction); - const shouldDisplayThreadReplies = ReportUtils.shouldDisplayThreadReplies(reportAction, reportID); - const subscribed = childReportNotificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; - if (type !== CONST.CONTEXT_MENU_TYPES.REPORT_ACTION) { - return false; - } - const isCommentAction = reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); - const isReportPreviewAction = reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; - const isIOUAction = reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); - return subscribed && (isCommentAction || isReportPreviewAction || isIOUAction) && (!isDeletedAction || shouldDisplayThreadReplies); - }, - onPress: (closePopover, {reportAction, reportID}) => { - const childReportNotificationPreference = ReportUtils.getChildReportNotificationPreference(reportAction); - if (closePopover) { - hideContextMenu(false, () => { - ReportActionComposeFocusManager.focus(); - Report.toggleSubscribeToChildReport(reportAction?.childReportID ?? '0', reportAction, reportID, childReportNotificationPreference); - }); - return; - } - - ReportActionComposeFocusManager.focus(); - Report.toggleSubscribeToChildReport(reportAction?.childReportID ?? '0', reportAction, reportID, childReportNotificationPreference); - }, - getDescription: () => {}, - }, { isAnonymousAction: true, textTranslateKey: 'reportActionContextMenu.copyURLToClipboard', From 7d0e9d342c3bb6c38f44ee5047605751def6e2c9 Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Thu, 1 Feb 2024 18:02:01 +0100 Subject: [PATCH 2/3] TEMP: re-trigger CI --- src/pages/home/report/ContextMenu/ContextMenuActions.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index 58e0794d796d..93cd1acfa2a6 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -301,6 +301,7 @@ const ContextMenuActions: ContextMenuAction[] = [ }, getDescription: () => {}, }, + // Trigger CI { isAnonymousAction: true, textTranslateKey: 'reportActionContextMenu.copyURLToClipboard', From 1d7ec0086ee6cd3a2c4af089cd7b5343ad60b4fe Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Thu, 1 Feb 2024 18:02:30 +0100 Subject: [PATCH 3/3] TEMP: re-trigger CI --- src/pages/home/report/ContextMenu/ContextMenuActions.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index 93cd1acfa2a6..58e0794d796d 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -301,7 +301,6 @@ const ContextMenuActions: ContextMenuAction[] = [ }, getDescription: () => {}, }, - // Trigger CI { isAnonymousAction: true, textTranslateKey: 'reportActionContextMenu.copyURLToClipboard',