Skip to content

Commit

Permalink
Fix the border bottom doesn't display in the header of completed task…
Browse files Browse the repository at this point in the history
… report
  • Loading branch information
mkzie2 committed Jan 9, 2025
1 parent 5fb81d6 commit 5949d1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
12 changes: 9 additions & 3 deletions src/pages/home/HeaderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
const defaultSubscriptSize = ReportUtils.isExpenseRequest(report) ? CONST.AVATAR_SIZE.SMALL_NORMAL : CONST.AVATAR_SIZE.DEFAULT;
const icons = ReportUtils.getIcons(reportHeaderData, personalDetails, null, '', -1, policy, invoiceReceiverPolicy);
const brickRoadIndicator = ReportUtils.hasReportNameError(report) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : '';
const shouldShowBorderBottom = !isTaskReport || !shouldUseNarrowLayout;
const shouldDisableDetailPage = ReportUtils.shouldDisableDetailPage(report);
const shouldUseGroupTitle = isGroupChat && (!!report?.reportName || !isMultipleParticipant);
const isLoading = !report?.reportID || !title;
Expand All @@ -154,7 +153,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto

return (
<View
style={[shouldShowBorderBottom && styles.borderBottom]}
style={[styles.borderBottom]}
dataSet={{dragArea: true}}
>
<View style={[styles.appContentHeader, !shouldUseNarrowLayout && styles.headerBarDesktopHeight]}>
Expand Down Expand Up @@ -286,7 +285,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
</PressableWithoutFeedback>
<View style={[styles.reportOptions, styles.flexRow, styles.alignItemsCenter]}>
{!shouldUseNarrowLayout && isChatUsedForOnboarding && <FreeTrial pressable />}
{isTaskReport && !shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && <TaskHeaderActionButton report={report} />}
{!shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && <TaskHeaderActionButton report={report} />}
{!isParentReportLoading && canJoin && !shouldUseNarrowLayout && joinButton}
</View>
{shouldDisplaySearchRouter && <SearchButton style={styles.ml2} />}
Expand Down Expand Up @@ -315,6 +314,13 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto
addSpacing
/>
)}
{!!report && shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && (
<View style={[styles.appBG, styles.pl0]}>
<View style={[styles.ph5, styles.pb3]}>
<TaskHeaderActionButton report={report} />
</View>
</View>
)}
</View>
);
}
Expand Down
9 changes: 0 additions & 9 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -777,15 +777,6 @@ function ReportScreen({route, navigation}: ReportScreenProps) {
needsOffscreenAlphaCompositing
>
{headerView}
{!!report && ReportUtils.isTaskReport(report) && shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && (
<View style={[styles.borderBottom]}>
<View style={[styles.appBG, styles.pl0]}>
<View style={[styles.ph5, styles.pb3]}>
<TaskHeaderActionButton report={report} />
</View>
</View>
</View>
)}
</OfflineWithFeedback>
{!!accountManagerReportID && ReportUtils.isConciergeChatReport(report) && isBannerVisible && (
<Banner
Expand Down

0 comments on commit 5949d1a

Please sign in to comment.