Skip to content

Commit 674c981

Browse files
authored
Revert "fix: delay transition to OD after onboarding"
1 parent daeff95 commit 674c981

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

src/libs/actions/Report.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4204,19 +4204,19 @@ function completeOnboarding({
42044204
optimisticData.push({
42054205
onyxMethod: Onyx.METHOD.MERGE,
42064206
key: ONYXKEYS.NVP_ONBOARDING,
4207-
value: {isLoading: true, hasCompletedGuidedSetupFlow: false},
4207+
value: {isLoading: true},
42084208
});
42094209

42104210
successData.push({
42114211
onyxMethod: Onyx.METHOD.MERGE,
42124212
key: ONYXKEYS.NVP_ONBOARDING,
4213-
value: {isLoading: false, hasCompletedGuidedSetupFlow: true},
4213+
value: {isLoading: false},
42144214
});
42154215

42164216
failureData.push({
42174217
onyxMethod: Onyx.METHOD.MERGE,
42184218
key: ONYXKEYS.NVP_ONBOARDING,
4219-
value: {isLoading: false, hasCompletedGuidedSetupFlow: false},
4219+
value: {isLoading: false},
42204220
});
42214221
}
42224222

src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
1+
import React, {useCallback, useContext, useEffect, useMemo, useState} from 'react';
22
import {InteractionManager, View} from 'react-native';
33
import Button from '@components/Button';
44
import Checkbox from '@components/Checkbox';
@@ -63,7 +63,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
6363
const {isOffline} = useNetwork();
6464
const isLoading = onboarding?.isLoading;
6565
const prevIsLoading = usePrevious(isLoading);
66-
const didOpenOldDotLink = useRef(false);
6766

6867
const features: Feature[] = useMemo(() => {
6968
return [
@@ -148,7 +147,7 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
148147
}, [paidGroupPolicy, onboardingPolicyID]);
149148

150149
useEffect(() => {
151-
if (!!isLoading || !prevIsLoading || didOpenOldDotLink.current) {
150+
if (!!isLoading || !prevIsLoading) {
152151
return;
153152
}
154153

@@ -158,7 +157,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
158157
return;
159158
}
160159
waitForIdle().then(() => {
161-
didOpenOldDotLink.current = true;
162160
openOldDotLink(CONST.OLDDOT_URLS.INBOX, true);
163161
});
164162
}, [isLoading, prevIsLoading, setRootStatusBarEnabled]);
@@ -214,12 +212,10 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
214212
});
215213

216214
if (shouldOnboardingRedirectToOldDot(onboardingCompanySize, newUserReportedIntegration)) {
217-
if (CONFIG.IS_HYBRID_APP || didOpenOldDotLink.current) {
215+
if (CONFIG.IS_HYBRID_APP) {
218216
return;
219217
}
220-
didOpenOldDotLink.current = true;
221218
openOldDotLink(CONST.OLDDOT_URLS.INBOX, true);
222-
return;
223219
}
224220

225221
// Avoid creating new WS because onboardingPolicyID is cleared before unmounting

0 commit comments

Comments
 (0)