diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts index a9117c386..2ec8c44fb 100644 --- a/src/app/pages/chat/chat.page.ts +++ b/src/app/pages/chat/chat.page.ts @@ -120,6 +120,11 @@ export class ChatPage implements OnInit { ){ this.loggedUserChat = authService.ValidatedUserChat['data']; this.headers = new HttpHeaders(); + window.onresize = (event) => { + if( window.innerWidth > 701){ + this.modalController.dismiss(); + } + }; } diff --git a/src/app/pages/chat/group-messages/group-messages.page.ts b/src/app/pages/chat/group-messages/group-messages.page.ts index c40abb91c..ab82b2491 100644 --- a/src/app/pages/chat/group-messages/group-messages.page.ts +++ b/src/app/pages/chat/group-messages/group-messages.page.ts @@ -54,6 +54,11 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { this.loggedUserChat = authService.ValidatedUserChat['data']; this.isGroupCreated = true; this.roomId = this.navParams.get('roomId'); + window.onresize = (event) => { + if( window.innerWidth > 701){ + this.modalController.dismiss(); + } + }; } ngOnInit() { diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index b0810150b..0408cc09e 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -60,6 +60,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { }); */ this.loggedUser = authService.ValidatedUserChat['data']; this.roomId = this.navParams.get('roomId'); + + window.onresize = (event) => { + if( window.innerWidth > 701){ + this.modalController.dismiss(); + } + }; } ngOnInit() {