This commit is contained in:
tiago.kayaya
2021-04-14 13:56:38 +01:00
parent e4b3c6b2b3
commit eb189b6b2a
15 changed files with 482 additions and 9 deletions
+27
View File
@@ -20,6 +20,7 @@ import { NewGroupPage } from './new-group/new-group.page';
import { NewchatPage } from './newchat/newchat.page';
import { Storage } from '@ionic/storage';
import { AlertService } from 'src/app/services/alert.service';
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
@Component({
selector: 'app-chat',
@@ -63,6 +64,7 @@ export class ChatPage implements OnInit {
showMessages=false;
showContacts=false;
showNewGroup=false;
showEditGroup=false;
showGroupMessages=false;
showGroupContacts=false;
emptyTextDescription = 'Sem conversa selecionada';
@@ -105,6 +107,7 @@ export class ChatPage implements OnInit {
this.showMessages=false;
this.showContacts=false;
this.showNewGroup=false;
this.showEditGroup=false;
this.showGroupMessages=false;
this.showEmptyComponent=false;
this.showGroupContacts=false;
@@ -154,6 +157,17 @@ export class ChatPage implements OnInit {
this.showNewGroup=true;
}
}
openEditGroupPage(rid) {
if( window.innerWidth <= 1024){
this.editGroup(rid);
}
else{
this.closeAllDesktopComponents();
this.showEditGroup=true;
}
}
openGroupMessagesPage(data) {
console.log('HERE');
@@ -263,6 +277,19 @@ export class ChatPage implements OnInit {
await modal.present();
modal.onDidDismiss();
}
async editGroup(roomId){
const modal = await this.modalController.create({
component: EditGroupPage,
cssClass: 'edit-group',
componentProps: {
roomId: roomId,
},
});
await modal.present();
modal.onDidDismiss();
}
async openMessagesModal(roomId:any){
this.closeAllDesktopComponents();