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
6 changes: 3 additions & 3 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4204,19 +4204,19 @@ function completeOnboarding({
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.NVP_ONBOARDING,
value: {isLoading: true, hasCompletedGuidedSetupFlow: false},
value: {isLoading: true},
});

successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.NVP_ONBOARDING,
value: {isLoading: false, hasCompletedGuidedSetupFlow: true},
value: {isLoading: false},
});

failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.NVP_ONBOARDING,
value: {isLoading: false, hasCompletedGuidedSetupFlow: false},
value: {isLoading: false},
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
import React, {useCallback, useContext, useEffect, useMemo, useState} from 'react';
import {InteractionManager, View} from 'react-native';
import Button from '@components/Button';
import Checkbox from '@components/Checkbox';
Expand Down Expand Up @@ -63,7 +63,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
const {isOffline} = useNetwork();
const isLoading = onboarding?.isLoading;
const prevIsLoading = usePrevious(isLoading);
const didOpenOldDotLink = useRef(false);

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

useEffect(() => {
if (!!isLoading || !prevIsLoading || didOpenOldDotLink.current) {
if (!!isLoading || !prevIsLoading) {
return;
}

Expand All @@ -158,7 +157,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
return;
}
waitForIdle().then(() => {
didOpenOldDotLink.current = true;
openOldDotLink(CONST.OLDDOT_URLS.INBOX, true);
});
}, [isLoading, prevIsLoading, setRootStatusBarEnabled]);
Expand Down Expand Up @@ -214,12 +212,10 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
});

if (shouldOnboardingRedirectToOldDot(onboardingCompanySize, newUserReportedIntegration)) {
if (CONFIG.IS_HYBRID_APP || didOpenOldDotLink.current) {
if (CONFIG.IS_HYBRID_APP) {
return;
}
didOpenOldDotLink.current = true;
openOldDotLink(CONST.OLDDOT_URLS.INBOX, true);
return;
}

// Avoid creating new WS because onboardingPolicyID is cleared before unmounting
Expand Down