This commit is contained in:
Peter Maquiran
2022-09-29 14:51:50 +01:00
parent 68d8753abd
commit 50a7290edf
3 changed files with 6 additions and 6 deletions
+1
View File
@@ -147,6 +147,7 @@ export class ChatPage implements OnInit {
if (event instanceof NavigationEnd && event.url == '/home/chat' ||
event instanceof NavigationEnd && event.url == "/home/chat?gbCreateGroup=true") {
this.chatService.refreshtoken();
this.checkCreateGroup();
}
@@ -18,8 +18,6 @@ export class ContactsPage implements OnInit {
loggedUser: any;
users = [];
headers: HttpHeaders;
options:any;
contacts:any;
textSearch:string;
room:any;
@@ -52,10 +50,8 @@ export class ContactsPage implements OnInit {
}
loadUsers(){
this.options = {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
this.chatService.getAllUsers().subscribe((res:any) => {
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
this.users = this.contacts.sort((a,b) => {
@@ -68,6 +64,8 @@ export class ContactsPage implements OnInit {
return 0;
});
this.showLoader = false;
}, (error) =>{
this.chatService.refreshtoken();
});
}