implement change group name

This commit is contained in:
tiago.kayaya
2021-01-27 11:23:57 +01:00
parent e7621c8e3d
commit d12a378836
13 changed files with 480 additions and 33 deletions
@@ -4,7 +4,7 @@
<button (click)="leaveGroup()" class="btn-cancel" shape="round" >Sair do Grupo</button>
</ion-col>
<ion-col>
<button class="btn-ok" shape="round" >Alterar nome do grupo</button>
<button (click)="openChangeGroupName()" class="btn-ok" shape="round" >Alterar nome do grupo</button>
</ion-col>
</ion-row>
<ion-row class="border-top">
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { NavParams, PopoverController } from '@ionic/angular';
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
import { EditGroupPage } from 'src/app/pages/chat/edit-group/edit-group.page';
import { ChatService } from 'src/app/services/chat.service';
@Component({
@@ -12,6 +13,7 @@ export class ChatPopoverPage implements OnInit {
constructor(
private popoverController: PopoverController,
private modalController: ModalController,
private navParams: NavParams,
private chatService: ChatService,
) {
@@ -57,5 +59,20 @@ export class ChatPopoverPage implements OnInit {
}
this.popoverController.dismiss(true);
}
async openChangeGroupName(){
const modal = await this.modalController.create({
component: EditGroupPage,
componentProps: {
room: this.room,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(()=>{
return true;
});
}
}