diff options
author | bobzel <zzzman@gmail.com> | 2020-10-09 16:54:21 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-09 16:54:21 -0400 |
commit | 2608cc4dbf852a318b9d6a453bdaf64249917cda (patch) | |
tree | 45f98ef5273256d980336426fbf9c74b5969038a /src/client/util/CurrentUserUtils.ts | |
parent | ec8673566721a4625466401502c2e16878658007 (diff) |
fixed updating groups to take effect immediately
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 759fd6eca..580c6040e 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -956,6 +956,9 @@ export class CurrentUserUtils { } static async updateUserDocument(doc: Doc, sharingDocumentId: string) { + if (!doc.globalGroupDatabase) doc.globalGroupDatabase = Docs.Prototypes.MainGroupDocument(); + await DocListCastAsync((doc.globalGroupDatabase as Doc).data); + UserGroups.Current; doc.system = true; doc.noviceMode = doc.noviceMode === undefined ? "true" : doc.noviceMode; doc.title = Doc.CurrentUserEmail; @@ -989,10 +992,7 @@ export class CurrentUserUtils { await this.setupSidebarButtons(doc); // the pop-out left sidebar of tools/panels await this.setupMenuPanel(doc, sharingDocumentId); if (!doc.globalScriptDatabase) doc.globalScriptDatabase = Docs.Prototypes.MainScriptDocument(); - doc.globalGroupDatabase = Docs.Prototypes.MainGroupDocument(); if (!doc.myLinkDatabase) doc.myLinkDatabase = new List([]); - const x = await DocListCastAsync((doc.globalGroupDatabase as Doc).data); - UserGroups.setCurrentUserGroups((doc.globalGroupDatabase as Doc).data as List<Doc>); setTimeout(() => this.setupDefaultPresentation(doc), 0); // presentation that's initially triggered |