mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +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();
|
this.doRefresh();
|
||||||
}
|
}
|
||||||
doRefresh(){
|
doRefresh(){
|
||||||
|
setInterval(()=>{
|
||||||
this.getDirectMessages();
|
this.getDirectMessages();
|
||||||
/* this.getConnectedRooms(); */
|
|
||||||
/* this.getConnectedChannels(); */
|
|
||||||
this.getGroups();
|
this.getGroups();
|
||||||
/* this.getConnectedUsers(); */
|
}, 2000);
|
||||||
}
|
}
|
||||||
getGroups(){
|
getGroups(){
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ export class MessagesPage implements OnInit, AfterViewChecked {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.chatService.sendMessage(body).subscribe(res=> {
|
this.chatService.sendMessage(body).subscribe(res=> {
|
||||||
/* console.log(res); */
|
|
||||||
this.loadMessages();
|
this.loadMessages();
|
||||||
});
|
});
|
||||||
|
this.message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
loadMessages(){
|
loadMessages(){
|
||||||
|
|||||||
Reference in New Issue
Block a user