Skip to content

Commit 4697b87

Browse files
authored
Merge pull request Expensify#67532 from allgandalf/patch-19
[No QA]: refactor `libs/actions/OnyxUpdateManager/utils/index.ts` to use `Onyx. connectWithoutView`
2 parents 0890f45 + bb76ffb commit 4697b87

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/libs/actions/OnyxUpdateManager/utils

src/libs/actions/OnyxUpdateManager/utils/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import {applyUpdates} from './applyUpdates';
99
import {clear, enqueue, getUpdates} from './DeferredOnyxUpdates';
1010

1111
let lastUpdateIDAppliedToClient: number = CONST.DEFAULT_NUMBER_ID;
12-
Onyx.connect({
12+
13+
// We have used `connectWithoutView` here because OnyxUpdates is not connected to any UI
14+
Onyx.connectWithoutView({
1315
key: ONYXKEYS.ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT,
1416
callback: (value) => (lastUpdateIDAppliedToClient = value ?? CONST.DEFAULT_NUMBER_ID),
1517
});

0 commit comments

Comments
 (0)