improve chat

This commit is contained in:
Peter Maquiran
2023-01-09 10:49:58 +01:00
parent 56c1733945
commit a73dde467c
21 changed files with 436 additions and 373 deletions
+8 -7
View File
@@ -283,11 +283,12 @@ export class ChatSystemService {
this.loadingWholeList = false
await this.storage.set('Rooms', rooms);
this.sortRoomList()
setTimeout(() => {
this.sortRoomList()
}, 1000)
setTimeout(() => {
this.sortRoomList()
}, 10000)
@@ -480,19 +481,19 @@ export class ChatSystemService {
*/
private getUserStatus(id?:string) {
this.RochetChatConnectorService.getUserStatus((d) => {
this.RochetChatConnectorService.getUserStatus(async (d) => {
const userId = d.fields.args[0][0]
const username = d.fields.args[0][1]
const statusNum = d.fields.args[0][2]
const statusText = this.statusNumberToText(statusNum)
this.users.forEach((user, index) => {
if(user.username == username) {
this.users[index].status = statusText
for ( const user of this.users) {
if(user._id == userId) {
user.status = statusText
}
})
}
})
}