Skip to content

Commit

Permalink
add rollingOngoidRequest before reseting to original state
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Jan 31, 2025
1 parent 5d009fe commit f32532a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/actions/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ROUTES from '@src/ROUTES';
import type * as OnyxTypes from '@src/types/onyx';
import type {OnyxData} from '@src/types/onyx/Request';
import {setShouldForceOffline} from './Network';
import {getAll, save} from './PersistedRequests';
import {getAll, rollbackOngoingRequest, save} from './PersistedRequests';
import {createDraftInitialWorkspace, createWorkspace, generatePolicyID} from './Policy/Policy';
import {resolveDuplicationConflictAction} from './RequestConflictUtils';
import {isAnonymousUser} from './Session';
Expand Down Expand Up @@ -571,6 +571,7 @@ function clearOnyxAndResetApp(shouldNavigateToHomepage?: boolean) {
const shouldUseStagingServer = preservedShouldUseStagingServer;
const sequentialQueue = getAll();

rollbackOngoingRequest();
Onyx.clear(KEYS_TO_PRESERVE)
.then(() => {
// Network key is preserved, so when using imported state, we should stop forcing offline mode so that the app can re-fetch the network
Expand Down

0 comments on commit f32532a

Please sign in to comment.