Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359375
D7057.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7057.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D7057: [native] render avatar in profile screen
Attached
Detach File
Event Timeline
Log In to Comment