Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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=288 --cache --cache-location=node_modules/.cache/eslint",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=285 --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",
Expand Down
9 changes: 6 additions & 3 deletions src/libs/Network/SequentialQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import type {ConflictData} from '@src/types/onyx/Request';
import {isOffline, onReconnection} from './NetworkStore';

let shouldFailAllRequests: boolean;
Onyx.connect({
// Use connectWithoutView since this is for network data and don't affect to any UI
Onyx.connectWithoutView({
key: ONYXKEYS.NETWORK,
callback: (network) => {
if (!network) {
Expand Down Expand Up @@ -78,7 +79,8 @@ function flushOnyxUpdatesQueue() {

let queueFlushedDataToStore: OnyxUpdate[] = [];

Onyx.connect({
// Use connectWithoutView since this is for network queue and don't affect to any UI
Onyx.connectWithoutView({
key: ONYXKEYS.QUEUE_FLUSHED_DATA,
callback: (val) => {
if (!val) {
Expand Down Expand Up @@ -227,7 +229,8 @@ function flush(shouldResetPromise = true) {
}

// Ensure persistedRequests are read from storage before proceeding with the queue
const connection = Onyx.connect({
// Use connectWithoutView since this is for network queue and don't affect to any UI
const connection = Onyx.connectWithoutView({
key: ONYXKEYS.PERSISTED_REQUESTS,
// We exceptionally opt out of reusing the connection here to avoid extra callback calls due to
// an existing connection already made in PersistedRequests.ts.
Expand Down
Loading