aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/comments')
-rw-r--r--src/components/comments/ZoomInCropper.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx
index 6f8ff97c..3581168d 100644
--- a/src/components/comments/ZoomInCropper.tsx
+++ b/src/components/comments/ZoomInCropper.tsx
@@ -13,7 +13,7 @@ import {
SCREEN_HEIGHT,
SCREEN_WIDTH,
} from '../../utils';
-import {TaggSquareButton} from '../common';
+import {TaggSquareButton, TaggLoadingIndicator} from '../common';
import ReactNativeZoomableView from '@dudigital/react-native-zoomable-view/src/ReactNativeZoomableView';
import Video from 'react-native-video';
@@ -36,6 +36,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
// width and height of video, if video
const [origDimensions, setOrigDimensions] = useState<number[]>([0, 0]);
const vidRef = useRef<View>(null);
+ const [cropLoading, setCropLoading] = useState<boolean>(false);
// Stores the coordinates of the cropped image
const [x0, setX0] = useState<number>();
@@ -136,9 +137,11 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
cropHeight: origDimensions[1],
}));
}
+ setCropLoading(true);
cropVideo(
media.uri,
(croppedURL: string) => {
+ setCropLoading(false);
navigation.navigate('CaptionScreen', {
screenType,
media: {
@@ -255,6 +258,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
return (
<View style={styles.container}>
+ {cropLoading && <TaggLoadingIndicator fullscreen />}
<TouchableOpacity
style={styles.closeButton}
onPress={() => navigation.goBack()}>