From 42cb8bd80aab3b155cf3b1b30a4df0b696ef9723 Mon Sep 17 00:00:00 2001 From: allgandalf Date: Fri, 22 Aug 2025 10:33:55 +0530 Subject: [PATCH] use connectWithoutView --- package.json | 2 +- src/libs/subscribeToFullReconnect.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 801341ed68bb..68695cac4b7d 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=244 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=243 --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/subscribeToFullReconnect.ts b/src/libs/subscribeToFullReconnect.ts index c2caca5a17b7..a65bc356cf0c 100644 --- a/src/libs/subscribeToFullReconnect.ts +++ b/src/libs/subscribeToFullReconnect.ts @@ -13,7 +13,9 @@ Onyx.connect({ }); let reconnectAppIfFullReconnectBefore = ''; -Onyx.connect({ +// We do not depend on updates on the UI to determine if we should reconnect the app, +// so we can use `connectWithoutView` here. +Onyx.connectWithoutView({ key: ONYXKEYS.NVP_RECONNECT_APP_IF_FULL_RECONNECT_BEFORE, callback: (value) => { reconnectAppIfFullReconnectBefore = value ?? '';