Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3366456
D14038.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D14038.diff
View Options
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -240,6 +240,10 @@
+nextMode: LoggedOutMode,
};
+export type LoggedOutModalParams = {
+ +mode?: ?LoggedOutMode,
+};
+
type Props = {
+navigation: RootNavigationProp<'LoggedOutModal'>,
+route: NavigationRoute<'LoggedOutModal'>,
@@ -328,6 +332,14 @@
[setMode, modeValue],
);
+ React.useEffect(() => {
+ const navMode = props.route.params?.mode;
+ if (navMode) {
+ combinedSetMode(navMode);
+ props.navigation.setParams({ mode: null });
+ }
+ }, [combinedSetMode, props.navigation, props.route.params?.mode]);
+
const goBackToPrompt = React.useCallback(() => {
nextModeRef.current = 'prompt';
setMode({ nextMode: 'prompt' });
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -4,6 +4,7 @@
import type { ActionResultModalParams } from './action-result-modal.react.js';
import type { InviteLinkModalParams } from './invite-link-modal.react';
+import type { LoggedOutModalParams } from '../account/logged-out-modal.react';
import type { AvatarSelectionParams } from '../account/registration/avatar-selection.react.js';
import type { ConnectEthereumParams } from '../account/registration/connect-ethereum.react.js';
import type { ConnectFarcasterParams } from '../account/registration/connect-farcaster.react.js';
@@ -176,7 +177,7 @@
export const NUXTipOverlayBackdropRouteName = 'NUXTipOverlayBackdrop';
export type RootParamList = {
- +LoggedOutModal: void,
+ +LoggedOutModal: LoggedOutModalParams,
+App: void,
+ThreadPickerModal: ThreadPickerModalParams,
+AddUsersModal: AddUsersModalParams,
diff --git a/native/qr-code/qr-code-screen.react.js b/native/qr-code/qr-code-screen.react.js
--- a/native/qr-code/qr-code-screen.react.js
+++ b/native/qr-code/qr-code-screen.react.js
@@ -13,6 +13,7 @@
import type { QRCodeSignInNavigationProp } from './qr-code-sign-in-navigator.react.js';
import LinkButton from '../components/link-button.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
+import { LoggedOutModalRouteName } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
type QRCodeScreenProps = {
@@ -20,7 +21,6 @@
+route: NavigationRoute<'QRCodeScreen'>,
};
-// eslint-disable-next-line no-unused-vars
function QRCodeScreen(props: QRCodeScreenProps): React.Node {
const { qrData, generateQRCode } = useQRAuthContext();
@@ -40,11 +40,20 @@
const styles = useStyles(unboundStyles);
+ const goToRestoreFlow = React.useCallback(() => {
+ props.navigation.navigate(LoggedOutModalRouteName, {
+ mode: 'restore',
+ });
+ }, [props.navigation]);
+
let primaryRestoreButton = null;
if (usingRestoreFlow) {
primaryRestoreButton = (
<View style={styles.primaryRestoreButton}>
- <LinkButton text="Not logged in on another phone?" onPress={() => {}} />
+ <LinkButton
+ text="Not logged in on another phone?"
+ onPress={goToRestoreFlow}
+ />
</View>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 11:31 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584425
Default Alt Text
D14038.diff (3 KB)
Attached To
Mode
D14038: [native] Navigate from the QR screen to the restore screen
Attached
Detach File
Event Timeline
Log In to Comment