This commit is contained in:
Peter Maquiran
2023-08-11 16:46:06 +01:00
parent 0671471f59
commit b1e5857c82
6 changed files with 35 additions and 11 deletions
@@ -66,7 +66,7 @@ export class GroupContactsPage implements OnInit {
headers: this.headers,
};
this.chatService.getAllUsers().subscribe((res:any)=>{
if(this.members){
if(this.members) {
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
}
else{
@@ -149,6 +149,18 @@ export class GroupContactsPage implements OnInit {
onChange(event){
this.textSearch = event.detail.value;
this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {
if(a.name < b.name){
return -1;
}
if(a.name > b.name){
return 1;
}
return 0;
});
}
clicked(){