From 72701073d390d835d9a637a14f071c3a2405b97e Mon Sep 17 00:00:00 2001 From: Mahesh Vagicherla Date: Mon, 17 Jul 2023 22:26:27 +0530 Subject: [PATCH 1/2] fix: report view --- src/libs/actions/Report.js | 2 +- src/pages/home/report/ReportActionItem.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index c591c20afd42..f5f342dcaab9 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1846,7 +1846,7 @@ function flagComment(reportID, reportAction, severity) { reportActionID, // This check is to prevent flooding Concierge with test flags // If you need to test moderation responses from Concierge on dev, set this to false! - isDevRequest: Environment.isDevelopment(), + isDevRequest: false, }; API.write('FlagComment', parameters, {optimisticData, successData, failureData}); diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 6ecc012c24be..6970ee941fb8 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -165,10 +165,12 @@ function ReportActionItem(props) { return; } - if (_.contains([CONST.MODERATION.MODERATOR_DECISION_PENDING_HIDE, CONST.MODERATION.MODERATOR_DECISION_HIDDEN], latestDecision)) { + setModerationDecision(latestDecision); + if (!_.contains([CONST.MODERATION.MODERATOR_DECISION_APPROVED, CONST.MODERATION.MODERATOR_DECISION_PENDING], latestDecision)) { setIsHidden(true); + return; } - setModerationDecision(latestDecision); + setIsHidden(false); }, [latestDecision, props.action.actionName]); const toggleContextMenuFromActiveReportAction = useCallback(() => { From 366046a28c1b672af4a357f04c81695848f63dcb Mon Sep 17 00:00:00 2001 From: Mahesh Vagicherla Date: Fri, 21 Jul 2023 02:31:18 +0530 Subject: [PATCH 2/2] chore: revert env --- src/libs/actions/Report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 339226996a51..855c0f2a098d 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1847,7 +1847,7 @@ function flagComment(reportID, reportAction, severity) { reportActionID, // This check is to prevent flooding Concierge with test flags // If you need to test moderation responses from Concierge on dev, set this to false! - isDevRequest: false, + isDevRequest: Environment.isDevelopment(), }; API.write('FlagComment', parameters, {optimisticData, successData, failureData});