diff options
Diffstat (limited to 'Timeline/ClientApp/src/app/data/SyncStatusHub.ts')
-rw-r--r-- | Timeline/ClientApp/src/app/data/SyncStatusHub.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Timeline/ClientApp/src/app/data/SyncStatusHub.ts b/Timeline/ClientApp/src/app/data/SyncStatusHub.ts new file mode 100644 index 00000000..ed84f056 --- /dev/null +++ b/Timeline/ClientApp/src/app/data/SyncStatusHub.ts @@ -0,0 +1,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;
|