mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #8070 from cmgustavo/feat/resume-event-01
Update wallets on resume event (only mobile)
This commit is contained in:
commit
1cf98783b0
|
@ -1,7 +1,7 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { SplashScreen } from '@ionic-native/splash-screen';
|
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||||
import { StatusBar } from '@ionic-native/status-bar';
|
import { StatusBar } from '@ionic-native/status-bar';
|
||||||
import { ModalController, Platform } from 'ionic-angular';
|
import { Events, ModalController, Platform } from 'ionic-angular';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
//providers
|
//providers
|
||||||
|
@ -38,6 +38,7 @@ export class CopayApp {
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private statusBar: StatusBar,
|
private statusBar: StatusBar,
|
||||||
private splashScreen: SplashScreen,
|
private splashScreen: SplashScreen,
|
||||||
|
private events: Events,
|
||||||
private logger: Logger,
|
private logger: Logger,
|
||||||
private app: AppProvider,
|
private app: AppProvider,
|
||||||
private profile: ProfileProvider,
|
private profile: ProfileProvider,
|
||||||
|
@ -70,11 +71,18 @@ export class CopayApp {
|
||||||
|
|
||||||
this.statusBar.styleLightContent();
|
this.statusBar.styleLightContent();
|
||||||
this.splashScreen.hide();
|
this.splashScreen.hide();
|
||||||
}
|
|
||||||
//Check PIN or Fingerprint
|
// Subscribe Resume
|
||||||
this.onResumeSubscription = this.platform.resume.subscribe(() => {
|
this.onResumeSubscription = this.platform.resume.subscribe(() => {
|
||||||
this.openLockModal();
|
|
||||||
});
|
// Update Wallet Status
|
||||||
|
this.events.publish('status:updated');
|
||||||
|
|
||||||
|
// Check PIN or Fingerprint
|
||||||
|
this.openLockModal();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
this.openLockModal();
|
this.openLockModal();
|
||||||
// Check Profile
|
// Check Profile
|
||||||
this.profile.loadAndBindProfile().then((profile: any) => {
|
this.profile.loadAndBindProfile().then((profile: any) => {
|
||||||
|
|
Loading…
Reference in New Issue