aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/moments/TagFriendsScreen.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/screens/moments/TagFriendsScreen.tsx b/src/screens/moments/TagFriendsScreen.tsx
index 81415437..201caf49 100644
--- a/src/screens/moments/TagFriendsScreen.tsx
+++ b/src/screens/moments/TagFriendsScreen.tsx
@@ -66,7 +66,7 @@ const TagFriendsScreen: React.FC<TagFriendsScreenProps> = ({route}) => {
* Calculating image width and height with respect to it's enclosing view's dimensions. Only works for images.
*/
useEffect(() => {
- if (imageRef && imageRef.current) {
+ if (imageRef && imageRef.current && !media.isVideo) {
Image.getSize(
media.uri,
(w, h) => {
@@ -120,8 +120,13 @@ const TagFriendsScreen: React.FC<TagFriendsScreenProps> = ({route}) => {
source={{uri: media.uri}}
repeat={true}
onLoad={(response) => {
- const {width, height} = response.naturalSize;
- setMediaDimensions(width, height);
+ const {width, height, orientation} = response.naturalSize;
+ // portrait will flip width and height
+ if (orientation === 'portrait') {
+ setMediaDimensions(height, width);
+ } else {
+ setMediaDimensions(width, height);
+ }
}}
/>
</View>