Skip to content

Commit

Permalink
Merge pull request #54972 from rayane-djouah/add-nudgeMigration-times…
Browse files Browse the repository at this point in the history
…tamp-to-transition-url

Get nudgeMigration timestamp from OldDot transition url

(cherry picked from commit b81230d)

(CP triggered by thienlnam)
  • Loading branch information
puneetlath authored and OSBotify committed Jan 8, 2025
1 parent b2b8a48 commit 7eaeb40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/components/ExplanationModal.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import React from 'react';
import {useOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import * as Welcome from '@userActions/Welcome';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import FeatureTrainingModal from './FeatureTrainingModal';

function ExplanationModal() {
const {translate} = useLocalize();
const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRYNEWDOT);
const hasBeenAddedToNudgeMigration = !!tryNewDot?.nudgeMigration?.timestamp;

if (hasBeenAddedToNudgeMigration) {
return null;
}

return (
<FeatureTrainingModal
Expand Down
6 changes: 5 additions & 1 deletion src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ function signInAfterTransitionFromOldDot(transitionURL: string) {
autoGeneratedPassword,
clearOnyxOnStart,
completedHybridAppOnboarding,
nudgeMigrationTimestamp,
isSingleNewDotEntry,
primaryLogin,
shouldRemoveDelegatedAccess,
Expand Down Expand Up @@ -542,7 +543,10 @@ function signInAfterTransitionFromOldDot(transitionURL: string) {
[ONYXKEYS.ACCOUNT]: {primaryLogin},
[ONYXKEYS.CREDENTIALS]: {autoGeneratedLogin, autoGeneratedPassword},
[ONYXKEYS.IS_SINGLE_NEW_DOT_ENTRY]: isSingleNewDotEntry === 'true',
[ONYXKEYS.NVP_TRYNEWDOT]: {classicRedirect: {completedHybridAppOnboarding: completedHybridAppOnboarding === 'true'}},
[ONYXKEYS.NVP_TRYNEWDOT]: {
classicRedirect: {completedHybridAppOnboarding: completedHybridAppOnboarding === 'true'},
nudgeMigration: nudgeMigrationTimestamp ? {timestamp: new Date(nudgeMigrationTimestamp)} : undefined,
},
}),
)
.then(() => {
Expand Down

0 comments on commit 7eaeb40

Please sign in to comment.