diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-08 10:00:36 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-08 10:00:36 -0500 |
| commit | 94f2e575b95c6edd5410d440f7410d712c90b5db (patch) | |
| tree | bfdd27227a9ea9b07ee62adf3ad73db26e71942b /src/client/util | |
| parent | ca6e8145c5883e32f4cc65edbfff245cdde326ed (diff) | |
added doc data content synching to Git-like operations.
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/CurrentUserUtils.ts | 2 | ||||
| -rw-r--r-- | src/client/util/GroupManager.tsx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 8b425f929..ccdfeed5f 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -988,7 +988,7 @@ export class CurrentUserUtils { static async updateUserDocument(doc: Doc, sharingDocumentId: string, linkDatabaseId: string) { if (!doc.globalGroupDatabase) doc.globalGroupDatabase = Docs.Prototypes.MainGroupDocument(); const groups = await DocListCastAsync((doc.globalGroupDatabase as Doc).data); - reaction(() => DateCast((doc.globalGroupDatabase as Doc).lastModified), + reaction(() => DateCast((doc.globalGroupDatabase as Doc)["data-lastModified"]), async () => { const groups = await DocListCastAsync((doc.globalGroupDatabase as Doc).data); const mygroups = groups?.filter(group => JSON.parse(StrCast(group.members)).includes(Doc.CurrentUserEmail)) || []; diff --git a/src/client/util/GroupManager.tsx b/src/client/util/GroupManager.tsx index 6458de0ed..68af67a3b 100644 --- a/src/client/util/GroupManager.tsx +++ b/src/client/util/GroupManager.tsx @@ -146,7 +146,7 @@ export class GroupManager extends React.Component<{}> { addGroup(groupDoc: Doc): boolean { if (this.GroupManagerDoc) { Doc.AddDocToList(this.GroupManagerDoc, "data", groupDoc); - this.GroupManagerDoc.lastModified = new DateField; + this.GroupManagerDoc["data-lastModified"] = new DateField; return true; } return false; @@ -167,7 +167,7 @@ export class GroupManager extends React.Component<{}> { const index = DocListCast(this.GroupManagerDoc.data).findIndex(grp => grp === group); index !== -1 && Cast(this.GroupManagerDoc.data, listSpec(Doc), [])?.splice(index, 1); } - this.GroupManagerDoc.lastModified = new DateField; + this.GroupManagerDoc["data-lastModified"] = new DateField; if (group === this.currentGroup) { this.currentGroup = undefined; } @@ -188,7 +188,7 @@ export class GroupManager extends React.Component<{}> { !memberList.includes(email) && memberList.push(email); groupDoc.members = JSON.stringify(memberList); SharingManager.Instance.shareWithAddedMember(groupDoc, email); - this.GroupManagerDoc && (this.GroupManagerDoc.lastModified = new DateField); + this.GroupManagerDoc && (this.GroupManagerDoc["data-lastModified"] = new DateField); } } @@ -205,7 +205,7 @@ export class GroupManager extends React.Component<{}> { const user = memberList.splice(index, 1)[0]; groupDoc.members = JSON.stringify(memberList); SharingManager.Instance.removeMember(groupDoc, email); - this.GroupManagerDoc && (this.GroupManagerDoc.lastModified = new DateField); + this.GroupManagerDoc && (this.GroupManagerDoc["data-lastModified"] = new DateField); } } } |
