Chat system refactor

This commit is contained in:
2023-06-20 14:15:33 +01:00
parent 4365fac9b5
commit 234c1c092d
22 changed files with 397 additions and 263 deletions

View File

@ -34,7 +34,9 @@ export abstract class ExternalStore<TSnapshot> {
protected notifyChange(sn?: TSnapshot) {
this.#changed = true;
this.#hooks.forEach(h => h.fn(sn));
if (this.#hooks.length > 0) {
this.#hooks.forEach(h => h.fn(sn));
}
}
abstract takeSnapshot(): TSnapshot;