Skip to content

Commit

Permalink
Merge pull request #1831 from numbersprotocol/camera-rebrand-fix-capt…
Browse files Browse the repository at this point in the history
…ure-flow-2

fix(custom-camera): make sure confirm button works properly
  • Loading branch information
bafu authored Jul 19, 2022
2 parents edc1503 + 58f6baf commit 63588b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/features/home/custom-camera/custom-camera.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,12 @@ export class CustomCameraPage implements OnInit, OnDestroy {

async confirmCurrentCapture() {
if (this.curCaptureFilePath && this.curCaptureType) {
await this.customCameraService.uploadToCapture(
this.customCameraService.uploadToCapture(
this.curCaptureFilePath,
this.curCaptureType
);
this.removeCurrentCapture();
this.leaveCustomCamera();
}
this.leaveCustomCamera();
}

async isTorchOn() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class CustomCameraService {
const base64 = await blobToBase64(itemBlob);
const mimeType = itemToUpload.mimeType;
await this.captureService.capture({ base64, mimeType });
await this.removeFile(filePath);
} catch (error) {
const errMsg = this.translocoService.translate(`error.internetError`);
await this.errorService.toastError$(errMsg).toPromise();
Expand Down

0 comments on commit 63588b8

Please sign in to comment.