From d0092e072c1d7d93c8c3a99bf73f229ec223f623 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Thu, 31 Jul 2025 21:39:37 +0700 Subject: [PATCH 1/5] Refactor src/libs/actions/Device/index.ts to remove Onyx.connect() references --- src/libs/actions/Device/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Device/index.ts b/src/libs/actions/Device/index.ts index a167a13f9507..3e8264c5264f 100644 --- a/src/libs/actions/Device/index.ts +++ b/src/libs/actions/Device/index.ts @@ -16,7 +16,7 @@ function getDeviceID(): Promise { return; } - const connection = Onyx.connect({ + const connection = Onyx.connectWithoutView({ key: ONYXKEYS.DEVICE_ID, callback: (id) => { Onyx.disconnect(connection); From 9418602501f98b4eff3a9b473f704b20f6069c2e Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Fri, 1 Aug 2025 12:23:05 +0700 Subject: [PATCH 2/5] add comment --- package.json | 2 +- src/libs/actions/Device/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 726f2e510739..59baaa27baf7 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand", "perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure", "typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc", - "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=331 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=330 --cache --cache-location=node_modules/.cache/eslint", "lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh", "lint-watch": "npx eslint-watch --watch --changed", "shellcheck": "./scripts/shellCheck.sh", diff --git a/src/libs/actions/Device/index.ts b/src/libs/actions/Device/index.ts index 3e8264c5264f..3cea7b827ed9 100644 --- a/src/libs/actions/Device/index.ts +++ b/src/libs/actions/Device/index.ts @@ -16,6 +16,7 @@ function getDeviceID(): Promise { return; } + // Use connectWithoutView to since this is a one-time data fetch that disconnects immediately without triggering UI updates. const connection = Onyx.connectWithoutView({ key: ONYXKEYS.DEVICE_ID, callback: (id) => { From 55014b5bb0c0be8ec32597e65e805358faf937cf Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 2 Aug 2025 00:42:56 +0700 Subject: [PATCH 3/5] update cmt --- Mobile-Expensify | 2 +- src/libs/actions/Device/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 651d716772e8..8952f957bd78 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 651d716772e87683cf7fa2a27423c18a6dc84a36 +Subproject commit 8952f957bd78b10008c3f85ad04e5494d269213e diff --git a/src/libs/actions/Device/index.ts b/src/libs/actions/Device/index.ts index 3cea7b827ed9..cc972ecd70ec 100644 --- a/src/libs/actions/Device/index.ts +++ b/src/libs/actions/Device/index.ts @@ -16,7 +16,8 @@ function getDeviceID(): Promise { return; } - // Use connectWithoutView to since this is a one-time data fetch that disconnects immediately without triggering UI updates. + // Use connectWithoutView because this is a one-time data fetch that disconnects immediately without triggering UI updates + // and this onyx key is created for non-UI task only. const connection = Onyx.connectWithoutView({ key: ONYXKEYS.DEVICE_ID, callback: (id) => { From a308dc0a375fbfba773ea2c15fe87decab6f8e5d Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 2 Aug 2025 00:59:39 +0700 Subject: [PATCH 4/5] revert Mobile Folder --- Mobile-Expensify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 8952f957bd78..651d716772e8 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 8952f957bd78b10008c3f85ad04e5494d269213e +Subproject commit 651d716772e87683cf7fa2a27423c18a6dc84a36 From 7e50c97bc04ec253ee56425981afc8e86a10dc6a Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 2 Aug 2025 01:07:44 +0700 Subject: [PATCH 5/5] fix UTs --- tests/unit/ReportUtilsGetIconsTest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/ReportUtilsGetIconsTest.ts b/tests/unit/ReportUtilsGetIconsTest.ts index cb15a26c86b8..2b30796a0384 100644 --- a/tests/unit/ReportUtilsGetIconsTest.ts +++ b/tests/unit/ReportUtilsGetIconsTest.ts @@ -148,7 +148,7 @@ describe('getIcons', () => { it('should return the correct icons for archived non expense request/report', () => { const report: Report = { ...LHNTestUtils.getFakeReport([1], 0, true), - type: CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT, + type: CONST.REPORT.CHAT_TYPE.INVOICE, }; const policy = LHNTestUtils.getFakePolicy('1');