From 2e7e212ea7ff50317e85a94d7676d2a419f8b0f2 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Fri, 12 Jul 2024 01:52:46 -0400 Subject: [PATCH 1/2] Rename Onyx Key --- src/libs/ReportUtils.ts | 2 +- src/types/onyx/ReportNameValuePairs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 97d8c605b0ab..f8cc8dd8ea9e 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1255,7 +1255,7 @@ function isClosedExpenseReportWithNoExpenses(report: OnyxEntry): boolean */ function isArchivedRoom(report: OnyxInputOrEntry, reportNameValuePairs?: OnyxInputOrEntry): boolean { if (reportNameValuePairs) { - return reportNameValuePairs.isArchived; + return reportNameValuePairs.private_isArchived; } return report?.statusNum === CONST.REPORT.STATUS_NUM.CLOSED && report?.stateNum === CONST.REPORT.STATE_NUM.APPROVED; diff --git a/src/types/onyx/ReportNameValuePairs.ts b/src/types/onyx/ReportNameValuePairs.ts index 7726d07a3074..9d2720c3b5f2 100644 --- a/src/types/onyx/ReportNameValuePairs.ts +++ b/src/types/onyx/ReportNameValuePairs.ts @@ -3,7 +3,7 @@ import type * as OnyxCommon from './OnyxCommon'; /** Model of additional report details */ type ReportNameValuePairs = OnyxCommon.OnyxValueWithOfflineFeedback<{ /** Whether the report is an archived room */ - isArchived: boolean; + private_isArchived: boolean; }>; export default ReportNameValuePairs; From 1418fadd716cb13a57549d0d30e357c6bf810965 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Fri, 12 Jul 2024 18:22:25 -0400 Subject: [PATCH 2/2] disable lint next line --- src/types/onyx/ReportNameValuePairs.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/onyx/ReportNameValuePairs.ts b/src/types/onyx/ReportNameValuePairs.ts index 9d2720c3b5f2..8b5a50d8d5c8 100644 --- a/src/types/onyx/ReportNameValuePairs.ts +++ b/src/types/onyx/ReportNameValuePairs.ts @@ -3,6 +3,7 @@ import type * as OnyxCommon from './OnyxCommon'; /** Model of additional report details */ type ReportNameValuePairs = OnyxCommon.OnyxValueWithOfflineFeedback<{ /** Whether the report is an archived room */ + // eslint-disable-next-line @typescript-eslint/naming-convention private_isArchived: boolean; }>;