mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Fix go back
This commit is contained in:
@@ -8,7 +8,7 @@ import { SHA1 } from 'crypto-js'
|
||||
export class ChatUserService {
|
||||
|
||||
// main data
|
||||
private _userList = []
|
||||
private _userList = {}
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
|
||||
@@ -17,8 +17,8 @@ export class ChatUserService {
|
||||
this.keyName = ('chat'+SHA1(this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=>{
|
||||
let restore = localstoreService.get(this.keyName, [])
|
||||
this._userList = restore.userList
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._userList = restore.userList || {}
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -27,8 +27,9 @@ export class ChatUserService {
|
||||
return this._userList
|
||||
}
|
||||
|
||||
reset(userList: any[]) {
|
||||
this._userList = userList
|
||||
add(roomId:string, userList: any[] = []) {
|
||||
|
||||
this._userList[roomId] = userList
|
||||
|
||||
this.save()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user