mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve chat
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user