mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve code
This commit is contained in:
@@ -91,39 +91,35 @@ export class WsChatMethodsService {
|
||||
if(message.fields.args[0].rid) {
|
||||
|
||||
setTimeout(()=>{
|
||||
console.log('sort this._dm', this._dm)
|
||||
this._dm = this.sortService.sortDate(this._dm,'_updatedAt').reverse()
|
||||
this._group = this.sortService.sortDate(this._group,'_updatedAt').reverse()
|
||||
this.sortRoomList()
|
||||
|
||||
}, 100)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(message.msg =='changed' && message.collection == "stream-notify-room") {
|
||||
if(message.fields.eventName.includes('deleteMessage')){
|
||||
setTimeout(()=>{
|
||||
console.log('sort this._dm', this._dm)
|
||||
this._dm = this.sortService.sortDate(this._dm,'_updatedAt').reverse()
|
||||
this._group = this.sortService.sortDate(this._group,'_updatedAt').reverse()
|
||||
|
||||
this.sortRoomList()
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
await rooms.result.update.forEach( async (roomData: room) => {
|
||||
await this.prepareRoom(roomData);
|
||||
});
|
||||
|
||||
this._dm = this.sortService.sortDate(this._dm,'_updatedAt').reverse()
|
||||
this._group = this.sortService.sortDate(this._group,'_updatedAt').reverse()
|
||||
|
||||
this.sortRoomList()
|
||||
this.loadingWholeList = false
|
||||
}
|
||||
|
||||
|
||||
sortRoomList() {
|
||||
this._dm = this.sortService.sortDate(this._dm,'_updatedAt').reverse()
|
||||
this._group = this.sortService.sortDate(this._group,'_updatedAt').reverse()
|
||||
}
|
||||
|
||||
subscribeToRoom() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user