Skip to content

Commit

Permalink
Merge pull request #27766 from dukenv0307/fix/26015
Browse files Browse the repository at this point in the history
Add margin between unread marker and the created action
  • Loading branch information
mountiny authored Oct 2, 2023
2 parents a4b3669 + 13de88f commit 7ec43fa
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,15 @@ function ReportActionItem(props) {
};

if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED) {
let content = (
<ReportActionItemCreated
reportID={props.report.reportID}
policyID={props.report.policyID}
/>
);
const parentReportAction = ReportActionsUtils.getParentReportAction(props.report);
if (ReportActionsUtils.isTransactionThread(parentReportAction)) {
return (
content = (
<ShowContextMenuContext.Provider
value={{
anchor: popoverAnchorRef,
Expand All @@ -531,7 +537,7 @@ function ReportActionItem(props) {
}
if (ReportUtils.isTaskReport(props.report)) {
if (ReportUtils.isCanceledTaskReport(props.report, parentReportAction)) {
return (
content = (
<>
<ReportActionItemSingle
action={parentReportAction}
Expand All @@ -546,15 +552,15 @@ function ReportActionItem(props) {
);
}

return (
content = (
<TaskView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
);
}
if (ReportUtils.isExpenseReport(props.report) || ReportUtils.isIOUReport(props.report)) {
return (
content = (
<OfflineWithFeedback pendingAction={props.action.pendingAction}>
<MoneyReportView
report={props.report}
Expand All @@ -563,12 +569,13 @@ function ReportActionItem(props) {
</OfflineWithFeedback>
);
}
return (
<ReportActionItemCreated
reportID={props.report.reportID}
policyID={props.report.policyID}
/>
);

const isNormalCreatedAction =
!ReportActionsUtils.isTransactionThread(parentReportAction) &&
!ReportUtils.isTaskReport(props.report) &&
!ReportUtils.isExpenseReport(props.report) &&
!ReportUtils.isIOUReport(props.report);
return <View style={[props.shouldHideThreadDividerLine && !isNormalCreatedAction && styles.mb2]}>{content}</View>;
}
if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED) {
return <RenameAction action={props.action} />;
Expand Down

0 comments on commit 7ec43fa

Please sign in to comment.