Skip to content

Commit

Permalink
Update after PR #23255
Browse files Browse the repository at this point in the history
  • Loading branch information
alexxxwork committed Jul 22, 2023
1 parent e3d3795 commit 3dcce0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/settings/Report/ReportSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function ReportSettingsPage(props) {
const shouldDisableWelcomeMessage =
ReportUtils.isArchivedRoom(report) || !ReportUtils.isChatRoom(report) || _.isEmpty(linkedWorkspace) || linkedWorkspace.role !== CONST.POLICY.ROLE.ADMIN;

const shouldDisableSettings = _.isEmpty(report) || ReportUtils.shouldDisableSettings(report);
const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(report) && !ReportUtils.isChatThread(report);
const notificationPreference = translate(`notificationPreferencesPage.notificationPreferences.${report.notificationPreference}`);
const writeCapability = ReportUtils.isAdminRoom(report) ? CONST.REPORT.WRITE_CAPABILITIES.ADMINS : report.writeCapability || CONST.REPORT.WRITE_CAPABILITIES.ALL;
Expand All @@ -72,7 +73,7 @@ function ReportSettingsPage(props) {

return (
<ScreenWrapper>
<FullPageNotFoundView shouldShow={_.isEmpty(report)}>
<FullPageNotFoundView shouldShow={shouldDisableSettings}>
<HeaderWithBackButton
title={translate('common.settings')}
onBackButtonPress={() => Navigation.goBack(ROUTES.getReportDetailsRoute(report.reportID))}
Expand Down

0 comments on commit 3dcce0b

Please sign in to comment.