Page MenuHomePhabricator

D7057.diff
No OneTemporary

D7057.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
@@ -8,6 +8,7 @@
import { preRequestUserStateSelector } from 'lib/selectors/account-selectors.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { accountHasPassword } from 'lib/shared/account-utils.js';
+import { getAvatarForUser } from 'lib/shared/avatar-utils.js';
import type { LogOutResult } from 'lib/types/account-types.js';
import { type PreRequestUserState } from 'lib/types/session-types.js';
import { type CurrentUserInfo } from 'lib/types/user-types.js';
@@ -20,6 +21,7 @@
import type { ProfileNavigationProp } from './profile.react.js';
import { deleteNativeCredentialsFor } from '../account/native-credentials.js';
import Action from '../components/action-row.react.js';
+import Avatar from '../components/avatar.react.js';
import Button from '../components/button.react.js';
import EditSettingButton from '../components/edit-setting-button.react.js';
import { SingleLine } from '../components/single-line.react.js';
@@ -118,12 +120,22 @@
);
}
+ const avatarInfo = getAvatarForUser(this.props.currentUserInfo);
+
+ const avatar = (
+ <View style={this.props.styles.avatarSection}>
+ <Avatar size="profile" avatarInfo={avatarInfo} />
+ </View>
+ );
+
return (
<View style={this.props.styles.container}>
<ScrollView
contentContainerStyle={this.props.styles.scrollViewContentContainer}
style={this.props.styles.scrollView}
>
+ <Text style={this.props.styles.header}>USER AVATAR</Text>
+ <View style={this.props.styles.section}>{avatar}</View>
<Text style={this.props.styles.header}>ACCOUNT</Text>
<View style={this.props.styles.section}>
<Action.Row>
@@ -283,6 +295,10 @@
}
const unboundStyles = {
+ avatarSection: {
+ alignItems: 'center',
+ paddingVertical: 16,
+ },
container: {
flex: 1,
},

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 8:47 AM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2579096
Default Alt Text
D7057.diff (2 KB)

Event Timeline