Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3333357
D13869.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13869.diff
View Options
diff --git a/native/user-profile/user-profile-avatar.react.js b/native/user-profile/user-profile-avatar.react.js
--- a/native/user-profile/user-profile-avatar.react.js
+++ b/native/user-profile/user-profile-avatar.react.js
@@ -5,10 +5,11 @@
import * as React from 'react';
import { View, TouchableOpacity } from 'react-native';
-import { userProfileUserInfoContainerHeight } from './user-profile-constants.js';
import UserAvatar from '../avatars/user-avatar.react.js';
import { OverlayContext } from '../navigation/overlay-context.js';
import { UserProfileAvatarModalRouteName } from '../navigation/route-names.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { derivedDimensionsInfoSelector } from '../selectors/dimensions-selectors.js';
// We need to set onAvatarLayout in order to allow .measure() to be on the ref
const onAvatarLayout = () => {};
@@ -27,6 +28,9 @@
const avatarRef = React.useRef<?React.ElementRef<typeof View>>();
+ const dimensions = useSelector(derivedDimensionsInfoSelector);
+ const fullScreenHeight = dimensions.height;
+
const onPressAvatar = React.useCallback(() => {
invariant(overlayContext, 'UserProfileAvatar should have OverlayContext');
overlayContext.setScrollBlockingModalStatus('open');
@@ -45,8 +49,8 @@
};
const verticalBounds = {
- height: userProfileUserInfoContainerHeight,
- y: pageY,
+ height: fullScreenHeight,
+ y: 0,
};
navigate<'UserProfileAvatarModal'>({
@@ -59,7 +63,7 @@
},
});
});
- }, [navigate, overlayContext, route.key, userID]);
+ }, [navigate, overlayContext, route.key, userID, fullScreenHeight]);
return (
<TouchableOpacity onPress={onPressAvatar}>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 4:07 AM (16 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2552082
Default Alt Text
D13869.diff (1 KB)
Attached To
Mode
D13869: [native] Fix incorrectly set verticalBounds in UserProfileAvatar
Attached
Detach File
Event Timeline
Log In to Comment