aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/comments/ZoomInCropper.tsx8
-rw-r--r--src/screens/onboarding/ProfileInfoOnboarding.tsx1
-rw-r--r--src/screens/onboarding/legacy/ProfileOnboarding.tsx2
-rw-r--r--src/screens/profile/EditProfile.tsx2
-rw-r--r--src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx1
-rw-r--r--src/utils/camera.ts2
-rw-r--r--src/utils/users.ts5
7 files changed, 20 insertions, 1 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx
index 6f8ff97c..ab45f46b 100644
--- a/src/components/comments/ZoomInCropper.tsx
+++ b/src/components/comments/ZoomInCropper.tsx
@@ -13,9 +13,10 @@ 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';
+import Tagg from '../taggs/Tagg';
type ZoomInCropperRouteProps = RouteProp<MainStackParams, 'ZoomInCropper'>;
type ZoomInCropperNavigationProps = StackNavigationProp<
@@ -36,6 +37,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 +138,12 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
cropHeight: origDimensions[1],
}));
}
+ setCropLoading(true);
+ console.log(cropLoading);
cropVideo(
media.uri,
(croppedURL: string) => {
+ setCropLoading(false);
navigation.navigate('CaptionScreen', {
screenType,
media: {
@@ -255,6 +260,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
return (
<View style={styles.container}>
+ {cropLoading && <TaggLoadingIndicator fullscreen />}
<TouchableOpacity
style={styles.closeButton}
onPress={() => navigation.goBack()}>
diff --git a/src/screens/onboarding/ProfileInfoOnboarding.tsx b/src/screens/onboarding/ProfileInfoOnboarding.tsx
index cdfbea8f..1d068a2c 100644
--- a/src/screens/onboarding/ProfileInfoOnboarding.tsx
+++ b/src/screens/onboarding/ProfileInfoOnboarding.tsx
@@ -108,6 +108,7 @@ const ProfileInfoOnboarding: React.FC<ProfileInfoOnboardingProps> = ({
cropperToolbarTitle: 'Select Profile Picture',
mediaType: 'photo',
cropperCircleOverlay: true,
+ compressVideoPreset: 'Passthrough',
}).then((picture) => {
if ('path' in picture) {
setForm({
diff --git a/src/screens/onboarding/legacy/ProfileOnboarding.tsx b/src/screens/onboarding/legacy/ProfileOnboarding.tsx
index e994c1e6..88e9183f 100644
--- a/src/screens/onboarding/legacy/ProfileOnboarding.tsx
+++ b/src/screens/onboarding/legacy/ProfileOnboarding.tsx
@@ -167,6 +167,7 @@ const ProfileOnboarding: React.FC<ProfileOnboardingProps> = ({
cropping: true,
cropperToolbarTitle: 'Select Header',
mediaType: 'photo',
+ compressVideoPreset: 'Passthrough',
}).then((picture) => {
if ('path' in picture) {
setForm({
@@ -192,6 +193,7 @@ const ProfileOnboarding: React.FC<ProfileOnboardingProps> = ({
cropperToolbarTitle: 'Select Profile Picture',
mediaType: 'photo',
cropperCircleOverlay: true,
+ compressVideoPreset: 'Passthrough',
}).then((picture) => {
if ('path' in picture) {
setForm({
diff --git a/src/screens/profile/EditProfile.tsx b/src/screens/profile/EditProfile.tsx
index 20a62b19..fca02ffc 100644
--- a/src/screens/profile/EditProfile.tsx
+++ b/src/screens/profile/EditProfile.tsx
@@ -161,6 +161,7 @@ const EditProfile: React.FC<EditProfileProps> = ({route, navigation}) => {
cropping: true,
cropperToolbarTitle: 'Select Header',
mediaType: 'photo',
+ compressVideoPreset: 'Passthrough',
}).then((picture) => {
if ('path' in picture) {
setForm({
@@ -186,6 +187,7 @@ const EditProfile: React.FC<EditProfileProps> = ({route, navigation}) => {
cropperToolbarTitle: 'Select Profile Picture',
mediaType: 'photo',
cropperCircleOverlay: true,
+ compressVideoPreset: 'Passthrough',
}).then((picture) => {
if ('path' in picture) {
setForm({
diff --git a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
index f5a9f280..cdd9cedf 100644
--- a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
+++ b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
@@ -78,6 +78,7 @@ const SuggestedPeopleUploadPictureScreen: React.FC<SuggestedPeopleUploadPictureS
cropping: true,
cropperToolbarTitle: 'Select Photo',
mediaType: 'photo',
+ compressVideoPreset: 'Passthrough',
})
.then((picture) => {
if ('path' in picture) {
diff --git a/src/utils/camera.ts b/src/utils/camera.ts
index 9e37d62e..6c1b9d50 100644
--- a/src/utils/camera.ts
+++ b/src/utils/camera.ts
@@ -66,6 +66,7 @@ export const navigateToImagePicker = (
'UserLibrary',
],
mediaType: 'any',
+ compressVideoPreset: 'Passthrough',
})
.then((media) => {
callback(media);
@@ -80,6 +81,7 @@ export const navigateToImagePicker = (
export const navigateToVideoPicker = (callback: (vid: Video) => void) => {
ImagePicker.openPicker({
mediaType: 'video',
+ compressVideoPreset: 'Passthrough',
})
.then(async (vid) => {
if (vid.path) {
diff --git a/src/utils/users.ts b/src/utils/users.ts
index c1c3b8bc..75858fe2 100644
--- a/src/utils/users.ts
+++ b/src/utils/users.ts
@@ -254,6 +254,7 @@ export const patchProfile = async (
cropping: true,
cropperToolbarTitle: screenTitle,
mediaType: 'photo',
+ compressVideoPreset: 'Passthrough',
};
break;
case 'profile':
@@ -274,12 +275,16 @@ export const patchProfile = async (
cropperToolbarTitle: screenTitle,
mediaType: 'photo',
cropperCircleOverlay: true,
+ compressVideoPreset: 'Passthrough',
};
break;
default:
screenTitle = '';
requestTitle = '';
fileName = '';
+ imageSettings = {
+ compressVideoPreset: 'Passthrough',
+ };
}
return await ImagePicker.openPicker(imageSettings)