mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
> git show --textconv :src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts
This commit is contained in:
@@ -10,6 +10,7 @@ import { ConversationPage } from './conversation/conversation.page';
|
||||
styleUrls: ['./chat.page.scss'],
|
||||
})
|
||||
export class ChatPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
loggedUser: any;
|
||||
/* Set segment variable */
|
||||
segment:string;
|
||||
@@ -24,28 +25,33 @@ export class ChatPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = "Contactos";
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
this.loggedUser=res;
|
||||
});
|
||||
this.doRefresh();
|
||||
|
||||
}
|
||||
onSegmentChange(){
|
||||
this.doRefresh();
|
||||
}
|
||||
doRefresh(){
|
||||
this.getGroups();
|
||||
this.getConnectedUsers();
|
||||
}
|
||||
onSegmentChange(){
|
||||
this.RefreshEvents();
|
||||
}
|
||||
RefreshEvents(){}
|
||||
getGroups(){
|
||||
this.showLoader = true;
|
||||
this.result = this.chatService.getAllPrivateGroups().subscribe((res:any)=>{
|
||||
this.groupList = res.groups;
|
||||
/* console.log(this.groupList); */
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
getConnectedUsers(){
|
||||
this.showLoader = true;
|
||||
this.result = this.chatService.getAllConnectedUsers().subscribe((res:any)=>{
|
||||
this.userConnectedList = res.users;
|
||||
console.log(this.userConnectedList);
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
async starConversation(selectedUser) {
|
||||
const modal = await this.modalController.create({
|
||||
component: ConversationPage,
|
||||
|
||||
Reference in New Issue
Block a user