mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
log clearing unread state of a room
This commit is contained in:
parent
376e59820c
commit
48c361531d
@ -548,8 +548,10 @@ export class Room extends EventEmitter {
|
|||||||
this._emitCollectionChange(this);
|
this._emitCollectionChange(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
async clearUnread() {
|
async clearUnread(log = null) {
|
||||||
if (this.isUnread || this.notificationCount) {
|
if (this.isUnread || this.notificationCount) {
|
||||||
|
return await this._platform.logger.wrapOrRun(log, "clearUnread", async log => {
|
||||||
|
log.set("id", this.id);
|
||||||
const txn = this._storage.readWriteTxn([
|
const txn = this._storage.readWriteTxn([
|
||||||
this._storage.storeNames.roomSummary,
|
this._storage.storeNames.roomSummary,
|
||||||
]);
|
]);
|
||||||
@ -575,6 +577,7 @@ export class Room extends EventEmitter {
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user