Skip to content

Commit

Permalink
fix(custom-camera): make sure confirm button works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sultanmyrza committed Jul 19, 2022
1 parent edc1503 commit 58f6baf
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 58f6baf

Please sign in to comment.