diff options
author | crupest <crupest@outlook.com> | 2020-08-08 19:15:38 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-08 19:15:38 +0800 |
commit | e326506465d26e82f81fc95abc587fe911295ab3 (patch) | |
tree | d198f5a8ffee4883ae6a5e0cf96a97be8f78a823 /Timeline/ClientApp/src/app/data/SyncStatusHub.ts | |
parent | 1e9c928db67c24201dc000abf18991d47e786b53 (diff) | |
download | timeline-e326506465d26e82f81fc95abc587fe911295ab3.tar.gz timeline-e326506465d26e82f81fc95abc587fe911295ab3.tar.bz2 timeline-e326506465d26e82f81fc95abc587fe911295ab3.zip |
...
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;
|