This commit is contained in:
tiago.kayaya
2021-08-20 11:24:42 +01:00
parent 6b009f7c6a
commit 55ebb0219e
5 changed files with 31 additions and 17 deletions
+13 -5
View File
@@ -143,14 +143,18 @@ export class ChatPage implements OnInit {
hideRefreshButton(){
window.onresize = (event) => {
if( window.innerWidth < 701) {
this.idSelected = '';
this.hideRefreshBtn = false;
}
else{
this.hideRefreshBtn = true;
if(this.idSelected == ''){
this.showEmptyComponent=true;
}
}
}
if(window.innerWidth < 701){
console.log('YASS');
this.idSelected = '';
this.hideRefreshBtn = false;
}
}
@@ -184,9 +188,11 @@ hideRefreshButton(){
}
showEmptyContainer(){
this.idSelected = '';
this.showEmptyComponent=true;
}
openGroupContactsPage(data){
this.idSelected = '';
this.groupRoomId = data;
this.closeAllDesktopComponents();
if(window.innerWidth < 801){
@@ -197,12 +203,12 @@ hideRefreshButton(){
}
}
openMessagesPage(rid) {
this.idSelected = rid;
if( window.innerWidth < 701){
this.openMessagesModal(rid);
//this.router.navigate(['/home/chat/messages',rid,]);
}
else{
this.idSelected = rid;
this.closeAllDesktopComponents();
this.showEmptyComponent = false;
this.roomId = rid;
@@ -211,6 +217,7 @@ hideRefreshButton(){
}
openContactsPage() {
console.log('OK');
this.idSelected = '';
this.closeAllDesktopComponents();
if( window.innerWidth < 701){
@@ -222,6 +229,7 @@ hideRefreshButton(){
}
}
openNewGroupPage() {
this.idSelected = '';
if( window.innerWidth < 801){
this.newGroup();
}
@@ -242,13 +250,13 @@ hideRefreshButton(){
}
openGroupMessagesPage(rid) {
this.idSelected = rid;
console.log(rid);
if( window.innerWidth < 701){
this.openGroupMessagesModal(rid);
}
else{
this.idSelected = rid;
this.closeAllDesktopComponents();
this.showEmptyComponent = false;
this.roomId = rid;
@@ -427,7 +435,7 @@ hideRefreshButton(){
const modal = await this.modalController.create({
component: MessagesPage,
cssClass: 'modal modal-desktop messagesChatOpened',
cssClass: 'modal modal-desktop isMessagesChatOpened',
componentProps: {
roomId: roomId,
},
@@ -442,7 +450,7 @@ hideRefreshButton(){
const modal = await this.modalController.create({
component: GroupMessagesPage,
cssClass: 'modal modal-desktop groupChatOpened',
cssClass: 'modal modal-desktop isGroupChatOpened',
componentProps: {
roomId: roomId,
},