mirror of https://github.com/BTCPrivate/copay.git
Fix: camera remains active
This commit is contained in:
parent
5f9b62e2a5
commit
dd26996529
|
@ -96,8 +96,9 @@ export class CopayersPage {
|
|||
this.onGoingProcessProvider.set('deletingWallet', false);
|
||||
|
||||
this.pushNotificationsProvider.unsubscribe(this.wallet);
|
||||
this.navCtrl.popToRoot();
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot().then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
}).catch((err: any) => {
|
||||
this.onGoingProcessProvider.set('deletingWallet', false);
|
||||
let errorText = this.translate.instant('Error');
|
||||
|
|
|
@ -213,8 +213,9 @@ export class ImportWalletPage {
|
|||
this.navCtrl.popToRoot();
|
||||
}
|
||||
else {
|
||||
this.navCtrl.popToRoot();
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot().then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
}
|
||||
}).catch((err: any) => {
|
||||
this.logger.warn(err);
|
||||
|
@ -373,8 +374,9 @@ export class ImportWalletPage {
|
|||
if (this.navParams.data.fromScan) {
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
} else {
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(2);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,8 +169,9 @@ export class JoinWalletPage {
|
|||
if (this.navParams.data.fromScan) {
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
} else {
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(2);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,8 +62,9 @@ export class CoinbaseSettingsPage {
|
|||
).then((res) => {
|
||||
if (res) {
|
||||
this.coinbaseProvider.logout();
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -51,8 +51,9 @@ export class GlideraSettingsPage {
|
|||
).then((res) => {
|
||||
if (res) {
|
||||
this.glideraProvider.remove();
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -64,9 +64,12 @@ export class ScanPage {
|
|||
this.scannerIsDenied = false;
|
||||
this.scannerIsRestricted = false;
|
||||
this.canOpenSettings = false;
|
||||
console.log("#########################################CONSTRUCTOR");
|
||||
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log("#########################################VIEWDIDLOAD");
|
||||
this.logger.info('ionViewDidLoad ScanPage');
|
||||
}
|
||||
|
||||
|
@ -76,12 +79,14 @@ export class ScanPage {
|
|||
this.cameraToggleActive = false;
|
||||
this.lightActive = false;
|
||||
this.scanProvider.frontCameraEnabled = false;
|
||||
console.log("#########################################VIEWWILLLEAVE");
|
||||
this.scanProvider.deactivate();
|
||||
this.events.unsubscribe('incomingDataMenu.showMenu');
|
||||
this.events.unsubscribe('scannerServiceInitialized');
|
||||
}
|
||||
|
||||
ionViewWillEnter() {
|
||||
console.log("#########################################VIEWWILLENTER");
|
||||
//TODO support for browser
|
||||
if (!this.platform.isCordova) {
|
||||
this.notSupportedMessage = this.translate.instant("Scanner not supported");
|
||||
|
|
|
@ -619,8 +619,9 @@ export class ConfirmPage {
|
|||
let modal = this.modalCtrl.create(SuccessModalPage, params, { showBackdrop: true, enableBackdropDismiss: false });
|
||||
modal.present();
|
||||
modal.onDidDismiss(() => {
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -179,8 +179,9 @@ export class BitcoinCashPage {
|
|||
if (isNew)
|
||||
this.walletProvider.startScan(newWallet);
|
||||
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.onGoingProcessProvider.set('duplicatingWallet', false);
|
||||
|
|
|
@ -155,8 +155,9 @@ export class WalletAddressesPage {
|
|||
|
||||
public scan(): void {
|
||||
this.walletProvider.startScan(this.wallet);
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.push(WalletDetailsPage, { walletId: this.wallet.credentials.walletId })
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.push(WalletDetailsPage, { walletId: this.wallet.credentials.walletId });
|
||||
});
|
||||
}
|
||||
}
|
|
@ -55,8 +55,9 @@ export class WalletDeletePage {
|
|||
this.events.publish('status:updated');
|
||||
this.onGoingProcessProvider.set('deletingWallet', false);
|
||||
this.pushNotificationsProvider.unsubscribe(this.wallet);
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.popupProvider.ionicAlert(this.translate.instant('Error'), err.message || err);
|
||||
});
|
||||
|
|
|
@ -157,8 +157,9 @@ export class WalletExportPage {
|
|||
};
|
||||
|
||||
this.backupProvider.walletDownload(this.exportWalletForm.value.password, opts, this.navParams.data.walletId).then(() => {
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
}).catch((err: string) => {
|
||||
this.popupProvider.ionicAlert(this.translate.instant('Error'), this.translate.instant('Failed to export'));
|
||||
});
|
||||
|
|
|
@ -89,8 +89,9 @@ export class WalletInformationPage {
|
|||
opts.colorFor[this.wallet.credentials.walletId] = color;
|
||||
this.configProvider.set(opts);
|
||||
this.events.publish('wallet:updated', this.wallet.credentials.walletId);
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
});
|
||||
};
|
||||
|
||||
public openWalletExtendedPrivateKey(): void {
|
||||
|
|
|
@ -90,9 +90,10 @@ export class WalletServiceUrlPage {
|
|||
this.configProvider.set(opts);
|
||||
this.persistenceProvider.setCleanAndScanAddresses(this.wallet.credentials.walletId);
|
||||
this.events.publish('wallet:updated', this.wallet.credentials.walletId);
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.reload();
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
this.reload();
|
||||
});
|
||||
};
|
||||
|
||||
private reload(): void {
|
||||
|
|
|
@ -173,9 +173,10 @@ export class WalletTransactionHistoryPage {
|
|||
|
||||
this.logger.info('Transaction history cleared for :' + this.wallet.id);
|
||||
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.push(WalletDetailsPage, { walletId: this.wallet.credentials.walletId, clearCache: true });
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
this.navCtrl.push(WalletDetailsPage, { walletId: this.wallet.credentials.walletId, clearCache: true });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -153,12 +153,13 @@ export class PushNotificationsProvider {
|
|||
if (!wallet) return;
|
||||
|
||||
this.navCtrl = this.app.getActiveNav();
|
||||
this.navCtrl.popToRoot({ animate: false });
|
||||
this.navCtrl.parent.select(0);
|
||||
if (!wallet.isComplete()) {
|
||||
this.navCtrl.push(CopayersPage, { walletId: wallet.credentials.walletId });
|
||||
return;
|
||||
}
|
||||
this.navCtrl.push(WalletDetailsPage, { walletId: wallet.credentials.walletId });
|
||||
this.navCtrl.popToRoot({ animate: false }).then(() => {
|
||||
this.navCtrl.parent.select(0);
|
||||
if (!wallet.isComplete()) {
|
||||
this.navCtrl.push(CopayersPage, { walletId: wallet.credentials.walletId });
|
||||
return;
|
||||
}
|
||||
this.navCtrl.push(WalletDetailsPage, { walletId: wallet.credentials.walletId });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,6 +212,7 @@ export class ScanProvider {
|
|||
}
|
||||
this.hide();
|
||||
this.destroy();
|
||||
console.log("#################################");
|
||||
}
|
||||
|
||||
// Natively hide the QRScanner's preview
|
||||
|
|
Loading…
Reference in New Issue