diff options
author | Ivan Chen <ivan@tagg.id> | 2021-06-30 15:57:55 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-06-30 15:57:55 -0400 |
commit | 9eb246e92aad427ac4d12840960f0be531f43d19 (patch) | |
tree | 70e24d0a72a3a006adf2e456ff19ce090dc7ebd5 /src/utils/camera.ts | |
parent | 919a7c14633f0a381613cebf73e8f29d84d3ebe2 (diff) |
Squashed commit of the following:
commit 7046c2673c54ecf2f418a85fbcfc2c4872858697
Merge: 5480267b c6900bc6
Author: Ivan Chen <ivan@tagg.id>
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 <brian@tagg.id>
Date: Thu Jul 1 04:00:53 2021 +0900
Redo extraneous file
commit 4eda8db632ca996ff9712872b2076a8675a63523
Author: Brian Kim <brian@tagg.id>
Date: Thu Jul 1 03:52:50 2021 +0900
Updates from product
commit 1c1975265fb6013c34c8e766a7f11b0c5b8d1e11
Author: Brian Kim <brian@tagg.id>
Date: Thu Jul 1 01:23:19 2021 +0900
Respond to comments
commit 50344b4236e235fdd42997c1fe85f2c1bd014e47
Author: Brian Kim <brian@tagg.id>
Date: Tue Jun 29 23:04:22 2021 +0900
Fixed up some merge issues
commit 014af4ac61bae6e38a4965ceb274b147ac3395c6
Author: Brian Kim <brian@tagg.id>
Date: Tue Jun 29 23:01:24 2021 +0900
Construct and merge with master
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r-- | src/utils/camera.ts | 29 |
1 files changed, 26 insertions, 3 deletions
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.', + ), + }, + ); |