mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
improve
This commit is contained in:
@@ -21,6 +21,7 @@ export class ContactsPage implements OnInit {
|
||||
room:any;
|
||||
dm:any;
|
||||
sessionStore = SessionStore
|
||||
loading = false
|
||||
@Input() roomId: string;
|
||||
|
||||
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -67,10 +68,19 @@ export class ContactsPage implements OnInit {
|
||||
let body = {
|
||||
username: username,
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
this.ChatSystemService.getAllRooms();
|
||||
this.room = res['room'];
|
||||
this.openMessage.emit(this.room._id);
|
||||
|
||||
this.ChatSystemService.getAllRooms(() => {
|
||||
this.openMessage.emit(this.room._id);
|
||||
|
||||
this.loading = false
|
||||
}, this.room._id);
|
||||
|
||||
}, ()=> {
|
||||
this.loading = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user