Page MenuHomePhabricator

D13907.id45747.diff
No OneTemporary

D13907.id45747.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
@@ -504,12 +504,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 +521,7 @@
</TouchableOpacity>,
);
}
- if (__DEV__ || usingRestoreFlow) {
+ if ((__DEV__ || usingRestoreFlow) && mode.curMode === 'prompt') {
signInButtons.push(
<TouchableOpacity
onPress={onPressQRCodeSignIn}
@@ -535,7 +535,7 @@
}
let siweSection = null;
- if (!usingRestoreFlow) {
+ if (!usingRestoreFlow || mode.curMode === 'restore') {
siweSection = (
<>
<TouchableOpacity
@@ -558,7 +558,7 @@
}
let restoreButton = null;
- if (usingRestoreFlow) {
+ if (usingRestoreFlow && mode.curMode === 'prompt') {
restoreButton = (
<TouchableOpacity
onPress={onPressRestore}
@@ -571,12 +571,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 +584,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, 8:52 AM (15 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2560976
Default Alt Text
D13907.id45747.diff (2 KB)

Event Timeline