Skip to content

Commit

Permalink
Add system chat check when rendering footer
Browse files Browse the repository at this point in the history
  • Loading branch information
neonbhai committed Apr 29, 2024
1 parent 85bca6a commit c8e9484
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/report/ReportFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function ReportFooter({
const isSmallSizeLayout = windowWidth - (isSmallScreenWidth ? 0 : variables.sideBarWidth) < variables.anonymousReportFooterBreakpoint;
const hideComposer = !ReportUtils.canUserPerformWriteAction(report);
const canWriteInReport = ReportUtils.canWriteInReport(report);
const isSystemChat = ReportUtils.isSystemChat(report);

const allPersonalDetails = usePersonalDetails();

Expand Down Expand Up @@ -141,7 +142,7 @@ function ReportFooter({
/>
)}
{isArchivedRoom && <ArchivedReportFooter report={report} />}
{!isAnonymousUser && !canWriteInReport && <SystemChatReportFooterMessage />}
{!isAnonymousUser && !canWriteInReport && isSystemChat && <SystemChatReportFooterMessage />}
{!isSmallScreenWidth && <View style={styles.offlineIndicatorRow}>{hideComposer && <OfflineIndicator containerStyles={[styles.chatItemComposeSecondaryRow]} />}</View>}
</View>
)}
Expand Down

0 comments on commit c8e9484

Please sign in to comment.