only clear unread if needed

This commit is contained in:
Bruno Windels 2020-08-21 14:11:42 +02:00
parent 00e20d2088
commit 2742162c8e

View File

@ -197,6 +197,7 @@ export class Room extends EventEmitter {
}
async clearUnread() {
if (this.isUnread) {
const txn = await this._storage.readWriteTxn([
this._storage.storeNames.roomSummary,
]);
@ -212,6 +213,7 @@ export class Room extends EventEmitter {
this.emit("change");
this._emitCollectionChange(this);
}
}
/** @public */
async openTimeline() {