mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -86,9 +86,16 @@ export class ChatPage implements OnInit {
|
||||
getDirectMessages(){
|
||||
this.showLoader = true;
|
||||
|
||||
this.result = this.chatService.getAllDirectMessages().subscribe((res:any)=>{
|
||||
this.userDirectMessages = res.ims;
|
||||
console.log(res);
|
||||
/* this.result = */
|
||||
this.chatService.getAllDirectMessages().subscribe((res:any)=>{
|
||||
console.log(res.ims);
|
||||
|
||||
this.userDirectMessages = res.ims.sort((a,b)=>{
|
||||
var dateA = new Date(a.lastMessage._updatedAt).getTime();
|
||||
var dateB = new Date(b.lastMessage._updatedAt).getTime();
|
||||
return dateB - dateB;
|
||||
});
|
||||
console.log(this.userDirectMessages);
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user