git pull on developer

This commit is contained in:
Eudes Inácio
2022-01-03 06:46:40 +01:00
11 changed files with 75 additions and 23 deletions
+9 -10
View File
@@ -133,7 +133,7 @@ export class ChatPage implements OnInit {
this.modalController.dismiss();
}
};
this.showLoader = true;
}
ngOnInit() {
@@ -183,6 +183,10 @@ export class ChatPage implements OnInit {
});
}
numSequence(n: number): Array<number> {
return Array(n);
}
ngOnDestroy() {
this.setStatus('offline');
this.dataService.set("newGroup", false);
@@ -392,10 +396,12 @@ export class ChatPage implements OnInit {
load() {
switch (this.segment) {
case "Contactos":
this.showLoader = true;
this.getDirectMessages();
break;
case "Grupos":
this.showLoader = true;
this.getGroups();
break;
}
@@ -536,14 +542,10 @@ export class ChatPage implements OnInit {
}
async getDirectMessages(event?) {
this.chatService.getAllDirectMessages().subscribe(async (res: any) => {
this.showLoader = false;
this.transformDataRoomList(res.ims)
this.getDirectMessagesDB()
console.log('Chat list', res);
if (res != 200) {
@@ -571,7 +573,6 @@ export class ChatPage implements OnInit {
}
else {
//console.log('No timer!');
}
}
}
@@ -710,6 +711,7 @@ export class ChatPage implements OnInit {
async getGroups(event?) {
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res: any) => {
//console.log(res);
this.showLoader = false;
if (res.groups != 200) {
this.transformGroups(res.groups);
@@ -735,15 +737,12 @@ export class ChatPage implements OnInit {
if (this.segment == "Grupos" && this.showGroupMessages != true) {
await new Promise(resolve => setTimeout(resolve, 1000));
await this.getGroups();
//console.log('Timer groups list running')
}
}
}
else {
await this.getGroups();
}
});
}