@@ -3,7 +3,7 @@ import { Location } from '@angular/common';
3
3
import { Component , OnDestroy , OnInit } from '@angular/core' ;
4
4
import { Router } from '@angular/router' ;
5
5
import { Capacitor , PluginListenerHandle } from '@capacitor/core' ;
6
- import { NavController , Platform } from '@ionic/angular' ;
6
+ import { Platform } from '@ionic/angular' ;
7
7
import { UntilDestroy } from '@ngneat/until-destroy' ;
8
8
import { CaptureResult , PreviewCamera } from '@numbersprotocol/preview-camera' ;
9
9
import { BehaviorSubject , Subscription } from 'rxjs' ;
@@ -68,8 +68,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
68
68
private readonly goProBluetoothService : GoProBluetoothService ,
69
69
private readonly errorService : ErrorService ,
70
70
private readonly userGuideService : UserGuideService ,
71
- private readonly platform : Platform ,
72
- private readonly navCtrl : NavController
71
+ private readonly platform : Platform
73
72
) { }
74
73
75
74
ngOnInit ( ) {
@@ -99,7 +98,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
99
98
if ( this . mode$ . value === 'pre-publish' ) {
100
99
this . discardCurrentCapture ( ) ;
101
100
} else {
102
- this . navCtrl . back ( ) ;
101
+ this . leaveCustomCamera ( ) ;
103
102
}
104
103
} ) ;
105
104
}
@@ -242,7 +241,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {
242
241
}
243
242
244
243
async leaveCustomCamera ( ) {
245
- return this . location . back ( ) ;
244
+ this . router . navigate ( [ '..' ] ) ;
246
245
}
247
246
248
247
async captureFromGoPro ( ) {
0 commit comments