mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
only clear unread if needed
This commit is contained in:
parent
00e20d2088
commit
2742162c8e
@ -197,6 +197,7 @@ export class Room extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clearUnread() {
|
async clearUnread() {
|
||||||
|
if (this.isUnread) {
|
||||||
const txn = await this._storage.readWriteTxn([
|
const txn = await this._storage.readWriteTxn([
|
||||||
this._storage.storeNames.roomSummary,
|
this._storage.storeNames.roomSummary,
|
||||||
]);
|
]);
|
||||||
@ -212,6 +213,7 @@ export class Room extends EventEmitter {
|
|||||||
this.emit("change");
|
this.emit("change");
|
||||||
this._emitCollectionChange(this);
|
this._emitCollectionChange(this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** @public */
|
/** @public */
|
||||||
async openTimeline() {
|
async openTimeline() {
|
||||||
|
Loading…
Reference in New Issue
Block a user