aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SharingManager.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-10 17:49:41 -0400
committerbobzel <zzzman@gmail.com>2020-10-10 17:49:41 -0400
commitd123cac247bcc37aa00fe44a4933df86b71e93af (patch)
tree36060b427c7622d2b7d8c71e6df22c5517927315 /src/client/util/SharingManager.tsx
parent7314eace7c9df5d283b9c02cf08cc25857b88dd4 (diff)
split LinkDatbase into its own field in the user's registry. fixed sharing to set lastModified after modifying groups so that remote participants see the right data. fixed text boxes to show blue icon when there's an annotaitn entry
Diffstat (limited to 'src/client/util/SharingManager.tsx')
-rw-r--r--src/client/util/SharingManager.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx
index 16bcd46c8..271face98 100644
--- a/src/client/util/SharingManager.tsx
+++ b/src/client/util/SharingManager.tsx
@@ -22,11 +22,11 @@ import "./SharingManager.scss";
import { SelectionManager } from "./SelectionManager";
import { intersection } from "lodash";
import { SearchBox } from "../views/search/SearchBox";
-import { listSpec } from "../../fields/Schema";
export interface User {
email: string;
sharingDocumentId: string;
+ linkDatabaseId: string;
}
/**
@@ -53,6 +53,7 @@ const storage = "data";
interface ValidatedUser {
user: User; // database minimal info to identify / communicate with a user (email, sharing doc id)
sharingDoc: Doc; // document to share/message another user
+ linkDatabase: Doc;
userColor: string; // stored on the sharinDoc, extracted for convenience?
}
@@ -130,8 +131,10 @@ export class SharingManager extends React.Component<{}> {
const isCandidate = user.email !== Doc.CurrentUserEmail;
if (isCandidate) {
const sharingDoc = await DocServer.GetRefField(user.sharingDocumentId);
- if (sharingDoc instanceof Doc) {
- sharingDocs.push({ user, sharingDoc, userColor: StrCast(sharingDoc.color) });
+ const linkDatabase = await DocServer.GetRefField(user.linkDatabaseId);
+ if (sharingDoc instanceof Doc && linkDatabase instanceof Doc) {
+ await DocListCastAsync(linkDatabase.data);
+ sharingDocs.push({ user, sharingDoc, linkDatabase, userColor: StrCast(sharingDoc.color) });
}
}
});