Skip to content

Instantly share code, notes, and snippets.

@ahrherrera
Created December 19, 2019 19:42
Show Gist options
  • Save ahrherrera/cfdc990f2ba36a9a547deb6acf2fdcca to your computer and use it in GitHub Desktop.
Save ahrherrera/cfdc990f2ba36a9a547deb6acf2fdcca to your computer and use it in GitHub Desktop.
Resume platform
this.platform.resume.subscribe((res) => {
if(this.resumed == false){
//your logic goes here
this.auth.getUserData().subscribe(()=>{
console.log("User updated successfully");
if (this.auth.userdata.afiliado.bloqueado) {
this.alertCtrl.create({
title: "Su usuario está bloqueado",
subTitle: "Mientras su usuario está bloqueado, no puede recibir ni aceptar órdenes. <br><br> Si cree que es un error, contáctese con soporte."
}).present();
}
});
this.resumed = true;
}
});
this.platform.pause.subscribe((paus) => {
this.resumed = false;
//your logic goes here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment