Page MenuHomePhabricator

D13907.id45751.diff
No OneTemporary

D13907.id45751.diff

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
@@ -81,7 +81,11 @@
'worklet';
const headerHeight = Platform.OS === 'ios' ? 62.33 : 58.54;
let containerSize = headerHeight;
- if (modeValue === 'loading' || modeValue === 'prompt') {
+ if (
+ modeValue === 'loading' ||
+ modeValue === 'prompt' ||
+ modeValue === 'restore'
+ ) {
containerSize += Platform.OS === 'ios' ? 40 : 61;
} else if (modeValue === 'log-in') {
containerSize += 140;
@@ -504,12 +508,12 @@
[styles.buttonContainer, buttonsViewOpacity],
);
const buttons = React.useMemo(() => {
- if (mode.curMode !== 'prompt') {
+ if (mode.curMode !== 'prompt' && mode.curMode !== 'restore') {
return null;
}
const signInButtons = [];
- if (!usingRestoreFlow) {
+ if (!usingRestoreFlow || mode.curMode === 'restore') {
signInButtons.push(
<TouchableOpacity
onPress={onPressLogIn}
@@ -521,7 +525,7 @@
</TouchableOpacity>,
);
}
- if (__DEV__ || usingRestoreFlow) {
+ if ((__DEV__ || usingRestoreFlow) && mode.curMode === 'prompt') {
signInButtons.push(
<TouchableOpacity
onPress={onPressQRCodeSignIn}
@@ -535,7 +539,7 @@
}
let siweSection = null;
- if (!usingRestoreFlow) {
+ if (!usingRestoreFlow || mode.curMode === 'restore') {
siweSection = (
<>
<TouchableOpacity
@@ -558,7 +562,7 @@
}
let restoreButton = null;
- if (usingRestoreFlow) {
+ if (usingRestoreFlow && mode.curMode === 'prompt') {
restoreButton = (
<TouchableOpacity
onPress={onPressRestore}
@@ -571,12 +575,9 @@
);
}
- return (
- <AnimatedView style={buttonsViewStyle}>
- <LoggedOutStaffInfo />
- {siweSection}
- {restoreButton}
- <View style={styles.signInButtons}>{signInButtons}</View>
+ let registerButtons = null;
+ if (mode.curMode === 'prompt') {
+ registerButtons = (
<View style={styles.registerButtons}>
<TouchableOpacity
onPress={onPressNewRegister}
@@ -587,6 +588,21 @@
<Text style={classicAuthButtonTextStyle}>Register</Text>
</TouchableOpacity>
</View>
+ );
+ }
+
+ let loggedOutStaffInfo = null;
+ if (mode.curMode === 'prompt') {
+ loggedOutStaffInfo = <LoggedOutStaffInfo />;
+ }
+
+ return (
+ <AnimatedView style={buttonsViewStyle}>
+ {loggedOutStaffInfo}
+ {siweSection}
+ {restoreButton}
+ <View style={styles.signInButtons}>{signInButtons}</View>
+ {registerButtons}
</AnimatedView>
);
}, [

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 12:53 PM (18 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2561410
Default Alt Text
D13907.id45751.diff (2 KB)

Event Timeline