aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-09 23:54:11 -0400
committerbobzel <zzzman@gmail.com>2022-06-09 23:54:11 -0400
commitf550bca52735d9bd2195ff453e43beca18bef309 (patch)
tree5c524ee4beadfb911ddf0188a0c3ae178bb4b8c6 /src
parent2d7479e08f24ff2af050733c7ccb16d24870fa8d (diff)
opening a shared dashboard now adds it to myDashboards
Diffstat (limited to 'src')
-rw-r--r--src/client/util/CurrentUserUtils.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 9a01f3e5d..c801a6f2f 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -931,7 +931,6 @@ export class CurrentUserUtils {
sharedDocs.childContextMenuScripts = new List<ScriptField>([addToDashboards!,]);
sharedDocs.childContextMenuLabels = new List<string>(["Add to Dashboards",]);
sharedDocs.childContextMenuIcons = new List<string>(["user-plus",]);
-
}
doc.mySharedDocs = new PrefetchProxy(sharedDocs as Doc);
}
@@ -1111,6 +1110,9 @@ export class CurrentUserUtils {
public static openDashboard = (userDoc: Doc, doc: Doc, fromHistory = false) => {
CurrentUserUtils.MainDocId = doc[Id];
+ if (!DocListCast(CurrentUserUtils.MyDashboards.data).includes(doc)) {
+ Doc.AddDocToList(CurrentUserUtils.MyDashboards, "data", doc);
+ }
if (doc) { // this has the side-effect of setting the main container since we're assigning the active/guest dashboard
!("presentationView" in doc) && (doc.presentationView = new List<Doc>([Docs.Create.TreeDocument([], { title: "Presentation" })]));