From 9eb246e92aad427ac4d12840960f0be531f43d19 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 30 Jun 2021 15:57:55 -0400 Subject: Squashed commit of the following: commit 7046c2673c54ecf2f418a85fbcfc2c4872858697 Merge: 5480267b c6900bc6 Author: Ivan Chen Date: Wed Jun 30 15:16:02 2021 -0400 Merge pull request #479 from brian-tagg/tma959-gif-handle [TMA-959] GIF handle commit c6900bc62b2ea9a1eb07088ac02556c0dd1d5ebc Author: Brian Kim Date: Thu Jul 1 04:00:53 2021 +0900 Redo extraneous file commit 4eda8db632ca996ff9712872b2076a8675a63523 Author: Brian Kim Date: Thu Jul 1 03:52:50 2021 +0900 Updates from product commit 1c1975265fb6013c34c8e766a7f11b0c5b8d1e11 Author: Brian Kim Date: Thu Jul 1 01:23:19 2021 +0900 Respond to comments commit 50344b4236e235fdd42997c1fe85f2c1bd014e47 Author: Brian Kim Date: Tue Jun 29 23:04:22 2021 +0900 Fixed up some merge issues commit 014af4ac61bae6e38a4965ceb274b147ac3395c6 Author: Brian Kim Date: Tue Jun 29 23:01:24 2021 +0900 Construct and merge with master --- src/utils/camera.ts | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/camera.ts b/src/utils/camera.ts index e5eba5f8..0be4d27c 100644 --- a/src/utils/camera.ts +++ b/src/utils/camera.ts @@ -48,9 +48,7 @@ export const navigateToImagePicker = (callback: (pic: Image) => void) => { mediaType: 'photo', }) .then((pic) => { - if (pic.path && pic.filename) { - callback(pic); - } + callback(pic); }) .catch((err) => { if (err.code && err.code !== 'E_PICKER_CANCELLED') { @@ -81,3 +79,28 @@ export const navigateToVideoPicker = (callback: (vid: Video) => void) => { } }); }; + +export const showGIFFailureAlert = (onSuccess: () => void) => + Alert.alert( + 'Warning', + 'The app currently cannot handle GIFs, and will only save a static image.', + [ + { + text: 'Cancel', + onPress: () => {}, + style: 'cancel', + }, + { + text: 'Post', + onPress: onSuccess, + style: 'default', + }, + ], + { + cancelable: true, + onDismiss: () => + Alert.alert( + 'This alert was dismissed by tapping outside of the alert dialog.', + ), + }, + ); -- cgit v1.2.3-70-g09d2