mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
45 lines
1005 B
TypeScript
45 lines
1005 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
|
import { ChatService } from 'src/app/services/chat.service';
|
|
|
|
@Component({
|
|
selector: 'app-messages-options',
|
|
templateUrl: './messages-options.page.html',
|
|
styleUrls: ['./messages-options.page.scss'],
|
|
})
|
|
export class MessagesOptionsPage implements OnInit {
|
|
|
|
roomId:string;
|
|
|
|
constructor(
|
|
private popoverController: PopoverController,
|
|
private modalController: ModalController,
|
|
private chatService: ChatService,
|
|
private navParams: NavParams,
|
|
)
|
|
{
|
|
this.roomId = this.navParams.get('roomId');
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
close(){
|
|
if( window.innerWidth <= 1024){
|
|
this.popoverController.dismiss();
|
|
}
|
|
else{
|
|
this.modalController.dismiss();
|
|
}
|
|
}
|
|
|
|
closeChatRoom(){
|
|
let body = { "roomId": this.roomId }
|
|
this.chatService.removeChatRoom(body).subscribe(res=>{
|
|
console.log(res);
|
|
});
|
|
this.close();
|
|
}
|
|
|
|
}
|