Page MenuHomePhabricator

D6104.id20422.diff
No OneTemporary

D6104.id20422.diff

diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -6,6 +6,7 @@
import { logOutActionTypes, logOut } from 'lib/actions/user-actions';
import { preRequestUserStateSelector } from 'lib/selectors/account-selectors';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';
+import { accountHasPassword } from 'lib/shared/account-utils';
import type { LogOutResult } from 'lib/types/account-types';
import { type PreRequestUserState } from 'lib/types/session-types';
import { type CurrentUserInfo } from 'lib/types/user-types';
@@ -100,6 +101,26 @@
);
}
+ let passwordEditionUI;
+ if (accountHasPassword(this.props.currentUserInfo)) {
+ passwordEditionUI = (
+ <Action.Row>
+ <Text style={this.props.styles.label}>Password</Text>
+ <Text
+ style={[this.props.styles.content, this.props.styles.value]}
+ numberOfLines={1}
+ >
+ ••••••••••••••••
+ </Text>
+ <EditSettingButton
+ onPress={this.onPressEditPassword}
+ canChangeSettings={true}
+ style={this.props.styles.editPasswordButton}
+ />
+ </Action.Row>
+ );
+ }
+
return (
<View style={this.props.styles.container}>
<ScrollView
@@ -122,20 +143,7 @@
<Text style={this.props.styles.logOutText}>Log out</Text>
</Button>
</Action.Row>
- <Action.Row>
- <Text style={this.props.styles.label}>Password</Text>
- <Text
- style={[this.props.styles.content, this.props.styles.value]}
- numberOfLines={1}
- >
- ••••••••••••••••
- </Text>
- <EditSettingButton
- onPress={this.onPressEditPassword}
- canChangeSettings={true}
- style={this.props.styles.editPasswordButton}
- />
- </Action.Row>
+ {passwordEditionUI}
</View>
<View style={this.props.styles.section}>
<ProfileRow

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 7:51 PM (20 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2531545
Default Alt Text
D6104.id20422.diff (2 KB)

Event Timeline