Skip to content

Commit 4e9f504

Browse files
committed
hide concierg categorize message from LHN when categories are disabled
1 parent 2722661 commit 4e9f504

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/libs/OptionsListUtils/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ Onyx.connect({
267267
allSortedReportActions[reportID] = sortedReportActions;
268268
const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
269269
const chatReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${report?.chatReportID}`];
270+
const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`];
270271

271272
// If the report is a one-transaction report and has , we need to return the combined reportActions so that the LHN can display modifications
272273
// to the transaction thread or the report itself
@@ -292,7 +293,7 @@ Onyx.connect({
292293
const reportActionsForDisplay = sortedReportActions.filter(
293294
(reportAction, actionKey) =>
294295
(!(isWhisperAction(reportAction) && !isReportPreviewAction(reportAction) && !isMoneyRequestAction(reportAction)) || isActionableMentionWhisper(reportAction)) &&
295-
shouldReportActionBeVisible(reportAction, actionKey, isWriteActionAllowed) &&
296+
shouldReportActionBeVisible(reportAction, actionKey, isWriteActionAllowed, policy) &&
296297
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED &&
297298
reportAction.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
298299
);

0 commit comments

Comments
 (0)