Page MenuHomePhabricator

D9383.diff
No OneTemporary

D9383.diff

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

Mime Type
text/plain
Expires
Sat, Sep 21, 6:23 AM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2158986
Default Alt Text
D9383.diff (2 KB)

Event Timeline