diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html
index 31a2b15a3..ecbfa38e8 100644
--- a/src/app/pages/chat/chat.page.html
+++ b/src/app/pages/chat/chat.page.html
@@ -44,7 +44,7 @@
-
+
+
+
-
+
@@ -123,9 +138,25 @@
+
+
+
+
diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts
index 074c036e7..f5c856890 100644
--- a/src/app/pages/chat/chat.page.ts
+++ b/src/app/pages/chat/chat.page.ts
@@ -131,7 +131,7 @@ export class ChatPage implements OnInit {
this.modalController.dismiss();
}
};
-
+ this.showLoader = true;
}
ngOnInit() {
@@ -178,6 +178,10 @@ export class ChatPage implements OnInit {
});
}
+ numSequence(n: number): Array {
+ return Array(n);
+ }
+
ngOnDestroy() {
this.setStatus('offline');
this.dataService.set("newGroup", false);
@@ -386,10 +390,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;
}
@@ -483,14 +489,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) {
@@ -501,13 +503,6 @@ export class ChatPage implements OnInit {
return dateB - dateA;
});
}
- //console.log(res.ims);
- /* this.userDirectMessages = res.ims.sort((a, b) => {
- var dateA = new Date(a._updatedAt).getTime();
- var dateB = new Date(b._updatedAt).getTime();
- return dateB - dateA;
- }); */
- //console.log(this.userDirectMessages);
if (this.route.url != "/home/chat") {
//console.log("Timer message stop")
@@ -522,7 +517,6 @@ export class ChatPage implements OnInit {
}
else {
//console.log('No timer!');
-
}
}
}
@@ -555,19 +549,14 @@ 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.privateGroups = res.groups;
- /* this.result = this.chatService.getAllUserChannels().subscribe((res:any)=>{
- this.publicGroups = res.channels; */
- //let all = this.privateGroups.concat(this.publicGroups);
this.allGroups = this.privateGroups.sort((a, b) => {
var dateA = new Date(a._updatedAt).getTime();
var dateB = new Date(b._updatedAt).getTime();
return dateB - dateA;
});
- //console.log(this.allGroups);
- /* }); */
if (this.route.url != "/home/chat") {
console.log("Timer message stop")
}
@@ -576,15 +565,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();
}
-
});
}
diff --git a/src/assets/icon/icons-chat-grey.svg b/src/assets/icon/icons-chat-grey.svg
new file mode 100644
index 000000000..fd48a0b5e
--- /dev/null
+++ b/src/assets/icon/icons-chat-grey.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/assets/icon/icons-group-chat-grey.svg b/src/assets/icon/icons-group-chat-grey.svg
new file mode 100644
index 000000000..dd9a839fa
--- /dev/null
+++ b/src/assets/icon/icons-group-chat-grey.svg
@@ -0,0 +1,4 @@
+