aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-24 18:50:27 -0400
committerbobzel <zzzman@gmail.com>2021-03-24 18:50:27 -0400
commit147cd8618023884b9eb60a79d5efe53abefe9c47 (patch)
tree539ce5231106bc480ca1c57dcec2e47517921aa3 /src/fields/Doc.ts
parentcb082c8912156eb6c6f20f6a3b4d6350283fe2d2 (diff)
redid how LinkManager stores links on documents by putting them on the Doc itself instead of as a computedFn. This has a signifcant effect on efficiency since adding a link to one document will no longer invalidate every other view that references *any* document's links
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 953d96ffa..d0ccce9cf 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -85,6 +85,7 @@ export const DataSym = Symbol("Data");
export const LayoutSym = Symbol("Layout");
export const FieldsSym = Symbol("Fields");
export const AclSym = Symbol("Acl");
+export const DirectLinksSym = Symbol("DirectLinks");
export const AclUnset = Symbol("AclUnset");
export const AclPrivate = Symbol("AclOwnerOnly");
export const AclReadonly = Symbol("AclReadOnly");
@@ -185,6 +186,7 @@ export class Doc extends RefField {
@observable private ___fields: any = {};
@observable private ___fieldKeys: any = {};
@observable public [AclSym]: { [key: string]: symbol };
+ @observable public [DirectLinksSym]: Set<Doc> = new Set();
private [UpdatingFromServer]: boolean = false;
private [ForceServerWrite]: boolean = false;