Skip to content

Commit

Permalink
fix: custom camera android back button nav via angular router
Browse files Browse the repository at this point in the history
  • Loading branch information
sultanmyrza committed Nov 23, 2022
1 parent 13784b1 commit 0ff306c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/features/home/custom-camera/custom-camera.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Location } from '@angular/common';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Capacitor, PluginListenerHandle } from '@capacitor/core';
import { NavController, Platform } from '@ionic/angular';
import { Platform } from '@ionic/angular';
import { UntilDestroy } from '@ngneat/until-destroy';
import { CaptureResult, PreviewCamera } from '@numbersprotocol/preview-camera';
import { BehaviorSubject, Subscription } from 'rxjs';
Expand Down Expand Up @@ -68,8 +68,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
private readonly goProBluetoothService: GoProBluetoothService,
private readonly errorService: ErrorService,
private readonly userGuideService: UserGuideService,
private readonly platform: Platform,
private readonly navCtrl: NavController
private readonly platform: Platform
) {}

ngOnInit() {
Expand Down Expand Up @@ -99,7 +98,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
if (this.mode$.value === 'pre-publish') {
this.discardCurrentCapture();
} else {
this.navCtrl.back();
this.leaveCustomCamera();
}
});
}
Expand Down

0 comments on commit 0ff306c

Please sign in to comment.