Skip to content

Commit

Permalink
Hidden reveal message button when editing message
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Jun 14, 2023
1 parent 6e8435e commit e44d211
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function ReportActionItem(props) {
setIsHidden(true);
}
setModerationDecision(latestDecision.decision);
}, [props.action.message, props.action.actionName]);
}, [props.action.message[0].moderationDecisions, props.action.actionName]);

const toggleContextMenuFromActiveReportAction = useCallback(() => {
setIsContextMenuActive(ReportActionContextMenu.isActiveReportAction(props.action.reportActionID));
Expand Down Expand Up @@ -267,7 +267,7 @@ function ReportActionItem(props) {
: undefined,
]}
/>
{props.displayAsGroup && hasBeenFlagged && (
{hasBeenFlagged && (
<Button
small
style={[styles.mt2, styles.alignSelfStart]}
Expand Down Expand Up @@ -297,20 +297,6 @@ function ReportActionItem(props) {
}
/>
)}
{!props.displayAsGroup && hasBeenFlagged && (
<Button
small
style={[styles.mt2, styles.alignSelfStart]}
onPress={() => setIsHidden(!isHidden)}
>
<Text
style={styles.buttonSmallText}
selectable={false}
>
{isHidden ? props.translate('moderation.revealMessage') : props.translate('moderation.hideMessage')}
</Text>
</Button>
)}
</ShowContextMenuContext.Provider>
);
}
Expand Down

0 comments on commit e44d211

Please sign in to comment.