mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'feature/chatStorage' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -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)=>{
|
||||
|
||||
Reference in New Issue
Block a user