Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: New tagline after marking as unread have overlapping line #19658

Merged
merged 3 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check was not sufficient. It caused #24648

return shouldDisplayParentAction ? (
<ReportActionItemParentAction
shouldHideThreadDividerLine={shouldHideThreadDividerLine}
reportID={report.reportID}
parentReportID={`${report.parentReportID}`}
/>
Expand Down