diff options
author | Ivan Chen <ivan@tagg.id> | 2021-06-30 15:32:52 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-06-30 15:32:52 -0400 |
commit | a8c210165938cfa4da7ed6bc185af297d528d2aa (patch) | |
tree | 7ec1e7ce832d1d2933f6781e24e712d543901ea0 /src/components/comments | |
parent | c548f8df62c3775058ffa18e201ca230a641e6c1 (diff) |
Remove filename requirement for all moment upload
Diffstat (limited to 'src/components/comments')
-rw-r--r-- | src/components/comments/ZoomInCropper.tsx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx index cfd3cbbc..7fa88f6e 100644 --- a/src/components/comments/ZoomInCropper.tsx +++ b/src/components/comments/ZoomInCropper.tsx @@ -1,6 +1,7 @@ import {RouteProp} from '@react-navigation/core'; +import {useFocusEffect} from '@react-navigation/native'; import {StackNavigationProp} from '@react-navigation/stack'; -import React, {useEffect, useState} from 'react'; +import React, {useCallback, useEffect, useState} from 'react'; import {Image, StyleSheet, TouchableOpacity} from 'react-native'; import {normalize} from 'react-native-elements'; import ImageZoom, {IOnMove} from 'react-native-image-pan-zoom'; @@ -33,6 +34,19 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ const [y0, setY0] = useState<number>(); const [y1, setY1] = useState<number>(); + useFocusEffect( + useCallback(() => { + navigation.dangerouslyGetParent()?.setOptions({ + tabBarVisible: false, + }); + return () => { + navigation.dangerouslyGetParent()?.setOptions({ + tabBarVisible: true, + }); + }; + }, [navigation]), + ); + // Setting original aspect ratio of image useEffect(() => { if (media.uri) { @@ -65,7 +79,6 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({ screenType, title: title, media: { - filename: media.filename, uri: croppedURL, isVideo: false, }, |