aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/data/SyncStatusHub.ts
blob: ed84f05647d2b54ffa52edecb824c3aebfd984df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export class SyncStatusHub {
  private map = new Map<string, boolean>();

  get(key: string): boolean {
    return this.map.get(key) ?? false;
  }

  begin(key: string): void {
    this.map.set(key, true);
  }

  end(key: string): void {
    this.map.set(key, false);
  }
}

export const syncStatusHub = new SyncStatusHub();

export default syncStatusHub;