From 4cab6e0d15ee27c68c358b59ecc3f7e0a89b514f Mon Sep 17 00:00:00 2001
From: yipstanley <stanley_yip@brown.edu>
Date: Sat, 27 Jul 2019 19:05:23 -0400
Subject: fixed updating user doc stuff

---
 src/client/views/Main.tsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/client/views/Main.tsx')

diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 86578af3e..1cf13aa74 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -33,6 +33,11 @@ let swapDocs = async () => {
     DocServer.init(window.location.protocol, window.location.hostname, 4321, info.email);
     await Docs.Prototypes.initialize();
     await CurrentUserUtils.loadUserDocument(info);
+    // updates old user documents to prevent chrome on tree view.
+    (await Cast(CurrentUserUtils.UserDocument.workspaces, Doc))!.chromeStatus = "disabled";
+    (await Cast(CurrentUserUtils.UserDocument.recentlyClosed, Doc))!.chromeStatus = "disabled";
+    (await Cast(CurrentUserUtils.UserDocument.sidebar, Doc))!.chromeStatus = "disabled";
+    CurrentUserUtils.UserDocument.chromeStatus = "disabled";
     await swapDocs();
     ReactDOM.render(<MainView />, document.getElementById('root'));
 })();
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

