diff options
author | Ivan Chen <ivan@tagg.id> | 2021-08-06 17:47:57 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-08-06 17:47:57 -0400 |
commit | 3329ed720fb336d9e5f893158754f630c7c2509d (patch) | |
tree | 07a25a40831e8fbed83fd4879a1f3e415fe8f0ca /src/utils/camera.ts | |
parent | f4f8336bc66ed8de46ebdb2902a5cb37aac1b932 (diff) |
Cleanup code, Pause preview earlier
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r-- | src/utils/camera.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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<RNCamera>, 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); |