From 6bc79c5dfc5f61bf5d1b1544d399703c8006b898 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 26 Aug 2024 10:59:56 -0400 Subject: cleanup of myXXXstuff on dashboards --- src/client/views/DashboardView.tsx | 5 +++-- src/client/views/TagsView.tsx | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src/client') diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx index dcc5442f0..f4fc8ee9f 100644 --- a/src/client/views/DashboardView.tsx +++ b/src/client/views/DashboardView.tsx @@ -429,7 +429,8 @@ export class DashboardView extends ObservableReactComponent { dashboardDoc.pane_count = 1; freeformDoc.embedContainer = dashboardDoc; dashboardDoc.myOverlayDocs = new List(); - dashboardDoc.myPublishedDocs = new List(); + dashboardDoc[DocData].myPublishedDocs = new List(); + dashboardDoc[DocData].myTagCollections = new List(); Doc.AddDocToList(Doc.MyDashboards, 'data', dashboardDoc); @@ -467,7 +468,7 @@ export class DashboardView extends ObservableReactComponent { }; const myCalendars = DocUtils.AssignScripts(Docs.Create.CalendarCollectionDocument([], reqdOpts)); // { treeView_ChildDoubleClick: 'openPresentation(documentView.rootDoc)' } - dashboardDoc.myCalendars = new PrefetchProxy(myCalendars); + dashboardDoc[DocData].myCalendars = new PrefetchProxy(myCalendars); } public static SetupDashboardTrails(dashboardDoc: Doc) { diff --git a/src/client/views/TagsView.tsx b/src/client/views/TagsView.tsx index dffd1e096..394162f46 100644 --- a/src/client/views/TagsView.tsx +++ b/src/client/views/TagsView.tsx @@ -70,11 +70,7 @@ export class TagItem extends ObservableReactComponent { newTagCol.title = tag; newTagCol.collections = new List(); newTagCol[DocData].docs = new List(); - // If the active Dashboard does not have a tag Doc collection, create it. - if (Doc.ActiveDashboard) { - if (!Doc.ActiveDashboard.myTagCollections) Doc.ActiveDashboard.myTagCollections = new List(); - Doc.AddDocToList(Doc.ActiveDashboard, 'myTagCollections', newTagCol); - } + Doc.ActiveDashboard && Doc.AddDocToList(Doc.ActiveDashboard, 'myTagCollections', newTagCol); return newTagCol; }; -- cgit v1.2.3-70-g09d2