Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
Peter Maquiran
2021-08-20 12:02:51 +01:00
11 changed files with 72 additions and 55 deletions
+2
View File
@@ -111,6 +111,8 @@
[style.display]="showMessages ? 'flex' : 'none'"
(closeAllDesktopComponents)="closeAllDesktopComponents()"
(showEmptyContainer)="showEmptyContainer()"
(showEmptyContainer)="showEmptyContainer()"
(openNewEventPage)="openNewEventPage($event)"
[style.display]="showMessages ? 'flex' : 'none'"
[roomId]="roomId"
[showMessages]="showMessages" #messagecontainer>
+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,
},
@@ -268,8 +268,8 @@ export class GroupMessagesPage implements OnInit, AfterViewChecked {
console.log("Timer message stop")
} else {
//Check if modal is opened
if(document.querySelector('.groupChatOpened')){
await new Promise(resolve => setTimeout(resolve, 1000));
if(document.querySelector('.isGroupChatOpened')){
await new Promise(resolve => setTimeout(resolve, 5000));
await this.serverLongPull();
console.log('Timer message running')
}
+2 -2
View File
@@ -188,8 +188,8 @@ export class MessagesPage implements OnInit, AfterViewChecked {
console.log("Timer message stop")
} else {
//Check if modal is opened
if(document.querySelector('.messagesChatOpened')){
await new Promise(resolve => setTimeout(resolve, 1000));
if(document.querySelector('.isMessagesChatOpened')){
await new Promise(resolve => setTimeout(resolve, 5000));
await this.serverLongPull();
console.log('Timer message running')
}