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

This commit is contained in:
Eudes Inácio
2022-02-01 10:27:36 +01:00
23 changed files with 688 additions and 353 deletions
@@ -68,6 +68,13 @@ export class WsChatMethodsService {
}
getRoomFromDb() {
this.storage.get('Rooms').then((rooms) => {
rooms.result.update.forEach((roomData: room) => {
this.prepareRoom(roomData);
});
})
};
openRoom(roomId) {
if(this.currentRoom) {
@@ -92,9 +99,12 @@ export class WsChatMethodsService {
async getAllRooms () {
this.loadingWholeList = true
this.getRoomFromDb();
const rooms = await this.WsChatService.getRooms();
this.storage.set('Rooms', rooms);
// console.log("ROOMS" + JSON.stringify(rooms))
this.WsChatService.registerCallback({
type:'Onmessage',
funx:(message)=>{