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
@@ -49,7 +49,7 @@
</ion-list>
</div>
<ion-virtual-scroll [items]="ChatSystemService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
<ion-virtual-scroll [items]="users " approxItemHeight="70px" [headerFn]="separateLetter">
<div class="item-divider" *virtualHeader="let header">
<ion-label>{{header}}</ion-label>
@@ -237,6 +237,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(){
@@ -116,12 +116,12 @@ export class ChatPopoverPage implements OnInit {
if(this.room.t === 'p') {
this.chatService.deleteGroup(body).subscribe(res=>{
// this.ChatSystemService.deleteRoom(this.roomId)
this.ChatSystemService.deleteRoom(this.roomId)
});
}
else {
this.chatService.deleteChannel(body).subscribe(res=>{
// this.ChatSystemService.deleteRoom(this.roomId)
this.ChatSystemService.deleteRoom(this.roomId)
});
}
});