mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
improve chat
This commit is contained in:
@@ -14,13 +14,10 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
styleUrls: ['./contacts.page.scss'],
|
||||
})
|
||||
export class ContactsPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
loggedUser: any;
|
||||
users = [];
|
||||
|
||||
headers: HttpHeaders;
|
||||
options:any;
|
||||
contacts:any;
|
||||
textSearch:string;
|
||||
room:any;
|
||||
dm:any;
|
||||
@@ -45,9 +42,6 @@ export class ContactsPage implements OnInit {
|
||||
async ngOnInit() {
|
||||
|
||||
this.loadUsers();
|
||||
await this.chatService.refreshtoken();
|
||||
this.loadUsers();
|
||||
|
||||
}
|
||||
|
||||
onChange(event){
|
||||
@@ -71,24 +65,7 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
loadUsers() {
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=> {
|
||||
|
||||
//this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
|
||||
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
return -1;
|
||||
}
|
||||
if(a.name > b.name){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
this.showLoader = false;
|
||||
});
|
||||
this.ChatSystemService.getUser()
|
||||
}
|
||||
|
||||
separateLetter(record, recordIndex, records){
|
||||
|
||||
Reference in New Issue
Block a user