aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-30 17:32:56 -0400
committerIvan Chen <ivan@tagg.id>2021-06-30 17:32:56 -0400
commitb77a716e52fcc1e0c669ce59df1f063fb008a5ca (patch)
tree7935e82bfd4c5139461b00bdf6e5d218febd9e99 /src
parent8a4c85d445a7bff7e24264aa90f17359bef08bfd (diff)
Fix gallery repicking image bug
Diffstat (limited to 'src')
-rw-r--r--src/screens/moments/CameraScreen.tsx30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/screens/moments/CameraScreen.tsx b/src/screens/moments/CameraScreen.tsx
index 4ca79c4f..d9278876 100644
--- a/src/screens/moments/CameraScreen.tsx
+++ b/src/screens/moments/CameraScreen.tsx
@@ -16,11 +16,7 @@ import {
} from '../../components';
import {MainStackParams} from '../../routes';
import {HeaderHeight, normalize, SCREEN_WIDTH} from '../../utils';
-import {
- navigateToImagePicker,
- showGIFFailureAlert,
- takePicture,
-} from '../../utils/camera';
+import {showGIFFailureAlert, takePicture} from '../../utils/camera';
type CameraScreenRouteProps = RouteProp<MainStackParams, 'CameraScreen'>;
export type CameraScreenNavigationProps = StackNavigationProp<
@@ -148,19 +144,17 @@ const CameraScreen: React.FC<CameraScreenProps> = ({route, navigation}) => {
) : (
<GalleryIcon
mostRecentPhotoUri={mostRecentPhoto}
- callback={() =>
- navigateToImagePicker((pic) => {
- const filename = pic.filename;
- if (
- filename &&
- (filename.endsWith('gif') || filename.endsWith('GIF'))
- ) {
- showGIFFailureAlert(() => navigateToCropper(pic.path));
- } else {
- navigateToCropper(pic.path);
- }
- })
- }
+ callback={(pic) => {
+ const filename = pic.filename;
+ if (
+ filename &&
+ (filename.endsWith('gif') || filename.endsWith('GIF'))
+ ) {
+ showGIFFailureAlert(() => navigateToCropper(pic.path));
+ } else {
+ navigateToCropper(pic.path);
+ }
+ }}
/>
)}
</View>