mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Listening to chat in the interval of 2mins
This commit is contained in:
@@ -67,11 +67,10 @@ export class ChatPage implements OnInit {
|
||||
this.doRefresh();
|
||||
}
|
||||
doRefresh(){
|
||||
this.getDirectMessages();
|
||||
/* this.getConnectedRooms(); */
|
||||
/* this.getConnectedChannels(); */
|
||||
this.getGroups();
|
||||
/* this.getConnectedUsers(); */
|
||||
setInterval(()=>{
|
||||
this.getDirectMessages();
|
||||
this.getGroups();
|
||||
}, 2000);
|
||||
}
|
||||
getGroups(){
|
||||
this.showLoader = true;
|
||||
|
||||
@@ -86,9 +86,9 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
||||
}
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
/* console.log(res); */
|
||||
this.loadMessages();
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
|
||||
loadMessages(){
|
||||
|
||||
Reference in New Issue
Block a user