mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve chat
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<ion-content>
|
||||
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<!-- <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> -->
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<div class="main-header">
|
||||
<div class="header-top">
|
||||
<div class="middle">
|
||||
<ion-label class="title">{{ this.ChatSystemService.getDmRoom(this.roomId).name }}</ion-label>
|
||||
<ion-label class="title">{{ ChatSystemService.getDmRoom(this.roomId).name }}</ion-label>
|
||||
<button (click)="ChatMessageDebuggingPage()">Dev</button>
|
||||
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
|
||||
<span><ion-icon class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span>
|
||||
</div>
|
||||
<div hidden class="right">
|
||||
<button title="Menu" class="btn-no-color" (click)="_openMessagesOptions()">
|
||||
|
||||
Reference in New Issue
Block a user