@@ -3,7 +3,7 @@ import { Location } from '@angular/common';
33import { Component , OnDestroy , OnInit } from '@angular/core' ;
44import { Router } from '@angular/router' ;
55import { Capacitor , PluginListenerHandle } from '@capacitor/core' ;
6- import { NavController , Platform } from '@ionic/angular' ;
6+ import { Platform } from '@ionic/angular' ;
77import { UntilDestroy } from '@ngneat/until-destroy' ;
88import { CaptureResult , PreviewCamera } from '@numbersprotocol/preview-camera' ;
99import { BehaviorSubject , Subscription } from 'rxjs' ;
@@ -68,8 +68,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
6868 private readonly goProBluetoothService : GoProBluetoothService ,
6969 private readonly errorService : ErrorService ,
7070 private readonly userGuideService : UserGuideService ,
71- private readonly platform : Platform ,
72- private readonly navCtrl : NavController
71+ private readonly platform : Platform
7372 ) { }
7473
7574 ngOnInit ( ) {
@@ -99,7 +98,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
9998 if ( this . mode$ . value === 'pre-publish' ) {
10099 this . discardCurrentCapture ( ) ;
101100 } else {
102- this . navCtrl . back ( ) ;
101+ this . leaveCustomCamera ( ) ;
103102 }
104103 } ) ;
105104 }
@@ -242,7 +241,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
242241 }
243242
244243 async leaveCustomCamera ( ) {
245- return this . location . back ( ) ;
244+ this . router . navigate ( [ '..' ] ) ;
246245 }
247246
248247 async captureFromGoPro ( ) {
0 commit comments