aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/data/SyncStatusHub.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-08 19:15:38 +0800
committercrupest <crupest@outlook.com>2020-08-08 19:15:38 +0800
commite326506465d26e82f81fc95abc587fe911295ab3 (patch)
treed198f5a8ffee4883ae6a5e0cf96a97be8f78a823 /Timeline/ClientApp/src/app/data/SyncStatusHub.ts
parent1e9c928db67c24201dc000abf18991d47e786b53 (diff)
downloadtimeline-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.ts19
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;