This commit is contained in:
Peter Maquiran
2023-03-09 16:35:54 +01:00
parent 789c2f4e8b
commit b8a1734abb
5 changed files with 64 additions and 48 deletions
@@ -528,7 +528,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
});
await modal.present();
modal.onDidDismiss().then(res => {
console.log(res)
if (res.data == 'leave') {
this.getRoomInfo();
this.closeAllDesktopComponents.emit();
@@ -546,6 +546,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
//this.closeAllDesktopComponents.emit();
this.openEditGroupPage.emit(this.roomId);
} else if (res.data == 'addUser') {
this.openGroupContactsPage();
}
else {
@@ -616,24 +619,26 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
}
async addContacts() {
if(this.isAdmin) {
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(() => {
//this.getRoomInfo();
});
}
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(() => {
//this.getRoomInfo();
});
}