Skip to content

Commit cd5a177

Browse files
authored
Merge pull request Expensify#67544 from allgandalf/patch-21
[No QA]: Update OnyxUpdates.ts to use `connectWithoutView`
2 parents d759fda + da4847c commit cd5a177

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand",
4747
"perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure",
4848
"typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc",
49-
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=295 --cache --cache-location=node_modules/.cache/eslint",
49+
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=294 --cache --cache-location=node_modules/.cache/eslint",
5050
"lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh",
5151
"lint-watch": "npx eslint-watch --watch --changed",
5252
"shellcheck": "./scripts/shellCheck.sh",

src/libs/actions/OnyxUpdates.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import {queueOnyxUpdates} from './QueuedOnyxUpdates';
1515
// This key needs to be separate from ONYXKEYS.ONYX_UPDATES_FROM_SERVER so that it can be updated without triggering the callback when the server IDs are updated. If that
1616
// callback were triggered it would lead to duplicate processing of server updates.
1717
let lastUpdateIDAppliedToClient: number | undefined = 0;
18-
Onyx.connect({
18+
19+
// We have used `connectWithoutView` here because OnyxUpdates is not connected to any UI
20+
Onyx.connectWithoutView({
1921
key: ONYXKEYS.ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT,
2022
callback: (val) => (lastUpdateIDAppliedToClient = val),
2123
});

0 commit comments

Comments
 (0)