From bd316d9e1770a1600c96096a22793bd4e0fb35fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Wed, 2 Feb 2022 10:37:57 +0100 Subject: [PATCH] duplicate roms bug fix --- src/app/pages/chat/chat.page.ts | 4 ++-- src/app/pages/chat/group-messages/group-messages.page.html | 2 +- src/app/services/chat/ws-chat-methods.service.ts | 6 +++--- src/app/shared/chat/group-messages/group-messages.page.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts index b5963e605..8c6c10a53 100644 --- a/src/app/pages/chat/chat.page.ts +++ b/src/app/pages/chat/chat.page.ts @@ -143,8 +143,8 @@ export class ChatPage implements OnInit { ngOnInit() { - console.log(this.wsChatMethodsService.dm); - console.log(this.wsChatMethodsService.group); + console.log('Rooms INDIVIDUAIS',this.wsChatMethodsService._dm); + console.log(' ROOMS GROUP',this.wsChatMethodsService._group); this.segment = "Contactos"; diff --git a/src/app/pages/chat/group-messages/group-messages.page.html b/src/app/pages/chat/group-messages/group-messages.page.html index cdfd4646b..a6b7ff0fb 100644 --- a/src/app/pages/chat/group-messages/group-messages.page.html +++ b/src/app/pages/chat/group-messages/group-messages.page.html @@ -102,7 +102,7 @@
- image + image
diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index 2158e8be8..b82f531c9 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -99,10 +99,10 @@ export class WsChatMethodsService { async getAllRooms () { this.loadingWholeList = true - this.getRoomFromDb(); + //this.getRoomFromDb(); const rooms = await this.WsChatService.getRooms(); - - this.storage.set('Rooms', rooms); + await this.storage.remove('Rooms'); + await this.storage.set('Rooms', rooms); // console.log("ROOMS" + JSON.stringify(rooms)) this.WsChatService.registerCallback({ diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html index 2bbb6b651..40fe8d047 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.html +++ b/src/app/shared/chat/group-messages/group-messages.page.html @@ -78,7 +78,7 @@
- image + image