aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 1d65256a6..c60434d95 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -109,27 +109,14 @@ export class CollectionDockingView extends CollectionSubView() {
if (instance) {
const docList = DocListCast(instance.props.Document[DataSym].data);
// adds the doc of the newly created tab to the data-all field if it doesn't already include that doc or one of its aliases
- !docList.includes(document) && !docList.includes(document.aliasOf as Doc) && Doc.AddDocToList(instance.props.Document[DataSym], "data", document);
- // adds an alias of the doc to the data-all field of the layoutdocs of the aliases
- DocListCast(instance.props.Document.aliases).forEach(alias => {
- const aliasDocList = DocListCast(alias.data);
- // if aliasDocList contains the alias, don't do anything
- // otherwise add the original or an alias depending on whether the doc you're looking at is the current doc or a different alias
- !DocListCast(document.aliases).some(a => aliasDocList.includes(a)) && Doc.AddDocToList(alias, "data", document);//alias !== instance.props.Document ? Doc.MakeAlias(document) : document);
- });
+ !docList.includes(document) && !docList.includes(document.aliasOf as Doc) && Doc.AddDocToList(instance.props.Document, "data", document);
}
}
removeFromTabDocList = (document: Doc) => {
const instance = CollectionDockingView.Instance;
if (instance) {
// adds the doc of the newly created tab to the data-all field if it doesn't already include that doc or one of its aliases
- Doc.RemoveDocFromList(instance.props.Document[DataSym], "data", document);
- // adds an alias of the doc to the data-all field of the layoutdocs of the aliases
- DocListCast(instance.props.Document.aliases).forEach(alias => {
- // if aliasDocList contains the alias, don't do anything
- // otherwise add the original or an alias depending on whether the doc you're looking at is the current doc or a different alias
- Doc.RemoveDocFromList(alias, "data", document);//alias !== instance.props.Document ? Doc.MakeAlias(document) : document);
- });
+ Doc.RemoveDocFromList(instance.props.Document, "data", document);
document.type !== DocumentType.KVP && Doc.AddDocToList(CurrentUserUtils.MyHeaderBarDoc, "data", document);
}
}