aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LoadingBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-12 14:06:38 -0500
committerbobzel <zzzman@gmail.com>2023-12-12 14:06:38 -0500
commitb769a150c8da505289f045b8b296a759c75e03a8 (patch)
tree7aa8c82b1335bc5fe9e4a1a9fb72a4dcbab3a69f /src/client/views/nodes/LoadingBox.tsx
parent6951e98f1b863fe1f404d8bf532a9241e2371ec2 (diff)
fixed and cleaned up snapping lines
Diffstat (limited to 'src/client/views/nodes/LoadingBox.tsx')
-rw-r--r--src/client/views/nodes/LoadingBox.tsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/nodes/LoadingBox.tsx b/src/client/views/nodes/LoadingBox.tsx
index bbb725a3d..27d73a585 100644
--- a/src/client/views/nodes/LoadingBox.tsx
+++ b/src/client/views/nodes/LoadingBox.tsx
@@ -38,19 +38,17 @@ export class LoadingBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
return FieldView.LayoutString(LoadingBox, fieldKey);
}
// removes from currently loading display
- @action
public static removeCurrentlyLoading(doc: Doc) {
if (DocumentManager.Instance.CurrentlyLoading) {
const index = DocumentManager.Instance.CurrentlyLoading.indexOf(doc);
- index !== -1 && DocumentManager.Instance.CurrentlyLoading.splice(index, 1);
+ runInAction(() => index !== -1 && DocumentManager.Instance.CurrentlyLoading.splice(index, 1));
}
}
// adds doc to currently loading display
- @action
public static addCurrentlyLoading(doc: Doc) {
if (DocumentManager.Instance.CurrentlyLoading.indexOf(doc) === -1) {
- DocumentManager.Instance.CurrentlyLoading.push(doc);
+ runInAction(() => DocumentManager.Instance.CurrentlyLoading.push(doc));
}
}