Page MenuHomePhabricator

D13869.diff
No OneTemporary

D13869.diff

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

Mime Type
text/plain
Expires
Thu, Nov 7, 7:37 PM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2437630
Default Alt Text
D13869.diff (1 KB)

Event Timeline