fixe count

This commit is contained in:
Peter Maquiran
2023-01-30 16:41:20 +01:00
parent 49142391e9
commit 1a715f5260
3 changed files with 9 additions and 16 deletions
+1 -1
View File
@@ -348,7 +348,7 @@ export class RoomService {
this.messageUnread = true
}
setTimeout(()=>{
setTimeout(() => {
this.scrollDown()
}, 50)
@@ -14,7 +14,6 @@ export class ToDayEventStorageService {
private _eventsList:EventList[] = []
// local storage keyName
private keyName: string;
private _count = 0
constructor() {
@@ -24,7 +23,6 @@ export class ToDayEventStorageService {
setTimeout(() => {
let restore = localstoreService.get(this.keyName, {})
this._eventsList = restore.eventsList || []
this._count = parseInt(restore.count) || 0
}, 10)
}
@@ -33,17 +31,12 @@ export class ToDayEventStorageService {
return this._eventsList || []
}
get count() {
return this._count
}
set count(value: number) {
this._count = value
this.save()
return this._eventsList.length
}
reset(eventsList: EventList[]) {
this._eventsList = eventsList
this.count = this._eventsList.length
this.save()
}