Skip to content

Commit

Permalink
Merge pull request #19658 from hungvu193/fix-19443
Browse files Browse the repository at this point in the history
Fix: New tagline after marking as unread have overlapping line
  • Loading branch information
johnmlee101 committed May 30, 2023
2 parents 619a529 + f449a74 commit 16776ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/home/report/ReportActionItemParentAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import reportActionPropTypes from './reportActionPropTypes';
import * as ReportActionsUtils from '../../../libs/ReportActionsUtils';

const propTypes = {
/** Flag to show, hide the thread divider line */
shouldHideThreadDividerLine: PropTypes.bool,

/** The id of the report */
reportID: PropTypes.string.isRequired,

Expand All @@ -38,6 +41,7 @@ const propTypes = {
const defaultProps = {
report: {},
parentReportActions: {},
shouldHideThreadDividerLine: false,
};

const ReportActionItemParentAction = (props) => {
Expand Down Expand Up @@ -67,7 +71,7 @@ const ReportActionItemParentAction = (props) => {
/>
)}
</View>
<View style={[styles.threadDividerLine]} />
{!props.shouldHideThreadDividerLine && <View style={[styles.threadDividerLine]} />}
</OfflineWithFeedback>
);
};
Expand Down
3 changes: 3 additions & 0 deletions src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ const ReportActionsList = (props) => {
// When the new indicator should not be displayed we explicitly set it to null
const shouldDisplayNewMarker = reportAction.reportActionID === newMarkerReportActionID;
const shouldDisplayParentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED && ReportUtils.isThread(report);
const shouldHideThreadDividerLine =
shouldDisplayParentAction && sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === newMarkerReportActionID;
return shouldDisplayParentAction ? (
<ReportActionItemParentAction
shouldHideThreadDividerLine={shouldHideThreadDividerLine}
reportID={report.reportID}
parentReportID={`${report.parentReportID}`}
shouldDisplayNewMarker={shouldDisplayNewMarker}
Expand Down

0 comments on commit 16776ec

Please sign in to comment.