diff --git a/src/app/guards/inactivity.guard.ts b/src/app/guards/inactivity.guard.ts index f3a06be73..3c4e68c55 100644 --- a/src/app/guards/inactivity.guard.ts +++ b/src/app/guards/inactivity.guard.ts @@ -26,7 +26,7 @@ export class InactivityGuard implements CanActivate { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ this.router.navigate(['/home/events']); } - else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ + else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)){ @@ -59,7 +59,7 @@ export class InactivityGuard implements CanActivate { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ this.router.navigate(['/home/events']); } - else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ + else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)){ diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html index 699ed9fa2..9e6a51349 100644 --- a/src/app/pages/chat/chat.page.html +++ b/src/app/pages/chat/chat.page.html @@ -111,7 +111,7 @@ - +
@@ -150,7 +150,7 @@
- +
diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 9d3c2387d..f53df3185 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -207,7 +207,7 @@ export class InactivityPage implements OnInit { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ this.router.navigate(['/home/events'], {replaceUrl: true}); } - else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ + else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)){ @@ -230,7 +230,7 @@ export class InactivityPage implements OnInit { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ this.router.navigate(['/home/events']); } - else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ + else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)){ diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 655e60d2b..308d8543e 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -165,7 +165,7 @@ export class LoginPage implements OnInit { if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ this.router.navigate(['/home/events']); } - else if(this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)){ + else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ this.router.navigate(['/home/chat']); } else if(this.p.userPermission(this.p.permissionList.Actions.access)){ diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index 8780bb626..6d8ae3d30 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -33,7 +33,7 @@ export class WsChatMethodsService { _dm: RoomService[] = [] _group: RoomService[] = [] - loadingWholeList = false + loadingWholeList = false; dmCount = 0; groupCount = 0; @@ -121,7 +121,7 @@ export class WsChatMethodsService { this._dm = [] this._group = [] - this.loadingWholeList = false + this.loadingWholeList = false; this.dmCount = 0; this.groupCount = 0; @@ -177,13 +177,13 @@ export class WsChatMethodsService { const roomId = this.getRoomId(roomData); if(roomData.t == 'd') { - + const res = await this.chatService.getMembers(roomId).toPromise(); - + const members = res['members']; const users = members.filter(data => data.username != this.loggedUser.me.username); rooms.result.update[index]['members'] = users - + await this.prepareRoom(roomData); } else { if (roomData.t === 'p') { @@ -209,7 +209,7 @@ export class WsChatMethodsService { console.log('save rooms', rooms) await this.storage.set('Rooms', rooms); - + setTimeout(()=>{ this.sortRoomList() }, 1000) @@ -218,7 +218,7 @@ export class WsChatMethodsService { setTimeout(()=>{ this.sortRoomList() }, 10000) - + this.loadingWholeList = false }