Skip to content

Commit

Permalink
Merge pull request #46610 from ra-md/fix/46097
Browse files Browse the repository at this point in the history
Show FullPageNotFoundView when notification preference is set to hidden
  • Loading branch information
youssef-lr authored Aug 6, 2024
2 parents 934797e + dac685b commit 627ef1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/settings/Report/NotificationPreferencePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ type NotificationPreferencePageProps = WithReportOrNotFoundProps & StackScreenPr
function NotificationPreferencePage({report}: NotificationPreferencePageProps) {
const {translate} = useLocalize();
const [reportNameValuePairs] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${report.reportID || -1}`);
const shouldDisableNotificationPreferences = ReportUtils.isArchivedRoom(report, reportNameValuePairs) || ReportUtils.isSelfDM(report);
const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report);
const shouldDisableNotificationPreferences =
ReportUtils.isArchivedRoom(report, reportNameValuePairs) ||
ReportUtils.isSelfDM(report) ||
(!isMoneyRequestReport && report?.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN);
const notificationPreferenceOptions = Object.values(CONST.REPORT.NOTIFICATION_PREFERENCE)
.filter((pref) => pref !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN)
.map((preference) => ({
Expand Down

0 comments on commit 627ef1a

Please sign in to comment.