From e1533161b473f31544d018432abc8a9c8d4d0bfc Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 14 Sep 2021 23:16:17 -0400
Subject: fixed treeviews so that in filesys mode you can't indent a document
 into anything other than a folder.

---
 src/client/views/collections/TreeView.tsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src/client/views/collections/TreeView.tsx')

diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index 6bb7fb748..97de097e0 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -858,6 +858,7 @@ export class TreeView extends React.Component<TreeViewProps> {
             }
 
             const dentDoc = (editTitle: boolean, newParent: Doc, addAfter: Doc | undefined, parent: TreeView | CollectionTreeView | undefined) => {
+                if (parent instanceof TreeView && parent.props.treeView.fileSysMode && !newParent.isFolder) return;
                 const fieldKey = Doc.LayoutFieldKey(newParent);
                 if (remove && fieldKey && Cast(newParent[fieldKey], listSpec(Doc)) !== undefined) {
                     remove(child);
-- 
cgit v1.2.3-70-g09d2

