From 3329ed720fb336d9e5f893158754f630c7c2509d Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 6 Aug 2021 17:47:57 -0400 Subject: Cleanup code, Pause preview earlier --- src/utils/camera.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/camera.ts b/src/utils/camera.ts index ec2615de..c9dec292 100644 --- a/src/utils/camera.ts +++ b/src/utils/camera.ts @@ -23,12 +23,12 @@ export const takePicture = ( cameraRef: RefObject, callback: (pic: TakePictureResponse) => void, ) => { + cameraRef.current?.pausePreview(); if (cameraRef !== null) { const options: TakePictureOptions = { forceUpOrientation: true, orientation: 'portrait', writeExif: false, - pauseAfterCapture: true, }; cameraRef.current?.takePictureAsync(options).then((pic) => { callback(pic); -- cgit v1.2.3-70-g09d2