mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -47,6 +47,19 @@ export class WsChatMethodsService {
|
||||
|
||||
const sortedRoomList = this.sortService.sortDate(rooms.result.update, "_updatedAt.$date")
|
||||
|
||||
this.WsChatService.registerCallback({
|
||||
type:'Onmessage',
|
||||
funx:(message)=>{
|
||||
|
||||
if(message.msg =='changed' && message.collection == "stream-room-messages") {
|
||||
if(message.fields.args[0].rid) {
|
||||
const sortedRoomList = this.sortService.sortDate(rooms.result.update, "_updatedAt.$date")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
console.log(rooms.result.update);
|
||||
console.log(sortedRoomList);
|
||||
|
||||
@@ -57,9 +70,27 @@ export class WsChatMethodsService {
|
||||
this.prepareRoom(roomData);
|
||||
});
|
||||
|
||||
/* function compare( a, b ) {
|
||||
if ( a.last_nom < b.last_nom ){
|
||||
return -1;
|
||||
}
|
||||
if ( a.last_nom > b.last_nom ){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
this.dm.sort(compare); */
|
||||
|
||||
console.log(this.dm);
|
||||
|
||||
|
||||
|
||||
this.loadingWholeList = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
subscribeToRoom() {
|
||||
|
||||
for (const id in this.dm) {
|
||||
|
||||
Reference in New Issue
Block a user