Skip to content

Commit

Permalink
Revert "Fix different grayness levels on parent and child messages."
Browse files Browse the repository at this point in the history
  • Loading branch information
pecanoro authored Aug 29, 2023
1 parent 4675db5 commit 5da561f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions src/components/OfflineWithFeedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ const propTypes = {
/** Whether we should show the error messages */
shouldShowErrorMessages: PropTypes.bool,

/** Whether we should disable opacity */
shouldDisableOpacity: PropTypes.bool,

/** A function to run when the X button next to the error is clicked */
onClose: PropTypes.func,

Expand All @@ -66,7 +63,6 @@ const defaultProps = {
shouldHideOnDelete: true,
errors: null,
shouldShowErrorMessages: true,
shouldDisableOpacity: false,
onClose: () => {},
style: [],
contentContainerStyle: [],
Expand Down Expand Up @@ -100,7 +96,7 @@ function OfflineWithFeedback(props) {
const isOfflinePendingAction = props.network.isOffline && props.pendingAction;
const isUpdateOrDeleteError = hasErrors && (props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE);
const isAddError = hasErrors && props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD;
const needsOpacity = !props.shouldDisableOpacity && ((isOfflinePendingAction && !isUpdateOrDeleteError) || isAddError);
const needsOpacity = (isOfflinePendingAction && !isUpdateOrDeleteError) || isAddError;
const needsStrikeThrough = props.network.isOffline && props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const hideChildren = props.shouldHideOnDelete && !props.network.isOffline && props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !hasErrors;
let children = props.children;
Expand Down
1 change: 0 additions & 1 deletion src/pages/home/report/ReportActionItemParentAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ function ReportActionItemParentAction(props) {
}
return (
<OfflineWithFeedback
shouldDisableOpacity={Boolean(parentReportAction.pendingAction)}
pendingAction={lodashGet(props.report, 'pendingFields.addWorkspaceRoom') || lodashGet(props.report, 'pendingFields.createChat')}
errors={lodashGet(props.report, 'errorFields.addWorkspaceRoom') || lodashGet(props.report, 'errorFields.createChat')}
errorRowStyles={[styles.ml10, styles.mr2]}
Expand Down

0 comments on commit 5da561f

Please sign in to comment.