Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33370184
D9383.1768952464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D9383.1768952464.diff
View Options
diff --git a/native/avatars/avatar-constants.js b/native/avatars/avatar-constants.js
new file mode 100644
--- /dev/null
+++ b/native/avatars/avatar-constants.js
@@ -0,0 +1,13 @@
+// @flow
+
+export const xSmallAvatarSize = 16;
+
+export const smallAvatarSize = 24;
+
+export const mediumAvatarSize = 40;
+
+export const largeAvatarSize = 90;
+
+export const xLargeAvatarSize = 112;
+
+export const xxLargeAvatarSize = 224;
diff --git a/native/avatars/avatar.react.js b/native/avatars/avatar.react.js
--- a/native/avatars/avatar.react.js
+++ b/native/avatars/avatar.react.js
@@ -8,6 +8,14 @@
AvatarSize,
} from 'lib/types/avatar-types.js';
+import {
+ xSmallAvatarSize,
+ smallAvatarSize,
+ mediumAvatarSize,
+ largeAvatarSize,
+ xLargeAvatarSize,
+ xxLargeAvatarSize,
+} from './avatar-constants.js';
import Multimedia from '../media/multimedia.react.js';
type Props = {
@@ -122,34 +130,34 @@
overflow: 'hidden',
},
large: {
- borderRadius: 45,
- height: 90,
- width: 90,
+ borderRadius: largeAvatarSize / 2,
+ height: largeAvatarSize,
+ width: largeAvatarSize,
},
medium: {
- borderRadius: 20,
- height: 40,
- width: 40,
+ borderRadius: mediumAvatarSize / 2,
+ height: mediumAvatarSize,
+ width: mediumAvatarSize,
},
small: {
- borderRadius: 12,
- height: 24,
- width: 24,
+ borderRadius: smallAvatarSize / 2,
+ height: smallAvatarSize,
+ width: smallAvatarSize,
},
xLarge: {
- borderRadius: 56,
- height: 112,
- width: 112,
+ borderRadius: xLargeAvatarSize / 2,
+ height: xLargeAvatarSize,
+ width: xLargeAvatarSize,
},
xSmall: {
- borderRadius: 8,
- height: 16,
- width: 16,
+ borderRadius: xSmallAvatarSize / 2,
+ height: xSmallAvatarSize,
+ width: xSmallAvatarSize,
},
xxLarge: {
- borderRadius: 112,
- height: 224,
- width: 224,
+ borderRadius: xxLargeAvatarSize / 2,
+ height: xxLargeAvatarSize,
+ width: xxLargeAvatarSize,
},
});
diff --git a/native/user-profile/user-profile-avatar-modal.react.js b/native/user-profile/user-profile-avatar-modal.react.js
--- a/native/user-profile/user-profile-avatar-modal.react.js
+++ b/native/user-profile/user-profile-avatar-modal.react.js
@@ -5,6 +5,7 @@
import type { Dimensions } from 'lib/types/media-types.js';
import type { UserProfileBottomSheetNavigationProp } from './user-profile-bottom-sheet-navigator.react.js';
+import { xxLargeAvatarSize } from '../avatars/avatar-constants.js';
import UserAvatar from '../avatars/user-avatar.react.js';
import FullScreenViewModal from '../components/full-screen-view-modal.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
@@ -14,8 +15,8 @@
} from '../types/layout-types.js';
const avatarDimensions: Dimensions = {
- width: 224,
- height: 224,
+ width: xxLargeAvatarSize,
+ height: xxLargeAvatarSize,
};
export type UserProfileAvatarModalParams = {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 20, 11:41 PM (14 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5964998
Default Alt Text
D9383.1768952464.diff (2 KB)
Attached To
Mode
D9383: [native] introduce avatar constants
Attached
Detach File
Event Timeline
Log In to Comment