improvements

This commit is contained in:
tiago.kayaya
2021-09-09 11:47:49 +01:00
parent 9ff7a588d8
commit 129a709570
5 changed files with 86 additions and 9 deletions
@@ -52,8 +52,16 @@ export class ChatPopoverPage implements OnInit {
console.log(res);
this.close('leave');
},
(error)=>{
this.toastService.badRequest("Não foi possível sair do grupo")
(e)=>{
if(e.error.errorType = "error-you-are-last-owner"){
this.toastService.badRequest("Você é o último administrador do grupo. Por favor, defina o novo administrador antes de sair da grupo.");
this.close('cancel');
}
else{
this.toastService.badRequest("Não foi possível sair do grupo");
this.close('cancel');
}
},
()=>{
//loader.remove()
@@ -64,8 +72,15 @@ export class ChatPopoverPage implements OnInit {
console.log(res);
this.close('leave');
},
(error)=>{
this.toastService.badRequest("Não foi possível sair do grupo")
(e)=>{
if(e.error.errorType = "error-you-are-last-owner"){
this.toastService.badRequest("Você é o último administrador do grupo. Por favor, defina o novo administrador antes de sair da grupo.");
this.close('cancel');
}
else{
this.toastService.badRequest("Não foi possível sair do grupo");
this.close('cancel');
}
},
()=>{
//loader.remove()