Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 343ce3b

Browse files
committed
Make log spam more quiet
1 parent a0049f9 commit 343ce3b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/stores/room-list/algorithms/Algorithm.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,12 @@ export class Algorithm extends EventEmitter {
516516
if (isNullOrUndefined(rooms)) throw new Error(`Array of rooms cannot be null`);
517517
if (!this.sortAlgorithms) throw new Error(`Cannot set known rooms without a tag sorting map`);
518518

519-
console.warn("Resetting known rooms, initiating regeneration");
519+
if (!this.updatesInhibited) {
520+
// We only log this if we're expecting to be publishing updates, which means that
521+
// this could be an unexpected invocation. If we're inhibited, then this is probably
522+
// an intentional invocation.
523+
console.warn("Resetting known rooms, initiating regeneration");
524+
}
520525

521526
// Before we go any further we need to clear (but remember) the sticky room to
522527
// avoid accidentally duplicating it in the list.

0 commit comments

Comments
 (0)