Skip to content

Commit

Permalink
Merge pull request #22276 from dukenv0307/fix/20946
Browse files Browse the repository at this point in the history
Cut off reveal button when deleting in offline mode
  • Loading branch information
MariaHCD committed Jul 21, 2023
2 parents eebb9e1 + 1efdf15 commit 8dcad16
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,14 @@ function ReportActionItem(props) {
const decisions = lodashGet(props, ['action', 'message', 0, 'moderationDecisions'], []);
const latestDecision = lodashGet(_.last(decisions), 'decision', '');
useEffect(() => {
if (props.action.actionName !== CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT || _.isEmpty(latestDecision)) {
if (props.action.actionName !== CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT) {
return;
}

// Hide reveal message button and show the message if latestDecision is changed to empty
if (_.isEmpty(latestDecision)) {
setModerationDecision(CONST.MODERATION.MODERATOR_DECISION_APPROVED);
setIsHidden(false);
return;
}

Expand Down

0 comments on commit 8dcad16

Please sign in to comment.