From 20540a35be82c34cc3962de4f957d1aa43f8a2b0 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Thu, 26 Sep 2019 22:17:15 -0400 Subject: finally transferred google credential management to database --- src/client/views/nodes/DocumentView.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 78fcaad27..a6d350ca2 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -295,10 +295,10 @@ export class DocumentView extends DocComponent(Docu deleteClicked = (): void => { SelectionManager.DeselectAll(); this.props.removeDocument && this.props.removeDocument(this.props.Document); } @undoBatch - static makeNativeViewClicked = (doc: Doc): void => { swapViews(doc, "layoutNative", "layoutCustom"); } + static makeNativeViewClicked = async (doc: Doc): Promise => swapViews(doc, "layoutNative", "layoutCustom") - @undoBatch static makeCustomViewClicked = async (doc: Doc, dataDoc: Opt) => { + const batch = UndoManager.StartBatch("CustomViewClicked"); if (doc.layoutCustom === undefined) { Doc.GetProto(dataDoc || doc).layoutNative = Doc.MakeTitled("layoutNative"); await swapViews(doc, "", "layoutNative"); @@ -320,8 +320,9 @@ export class DocumentView extends DocComponent(Docu Doc.ApplyTemplateTo(docTemplate, doc, undefined); Doc.GetProto(dataDoc || doc).layoutCustom = Doc.MakeTitled("layoutCustom"); } else { - swapViews(doc, "layoutCustom", "layoutNative"); + await swapViews(doc, "layoutCustom", "layoutNative"); } + batch.end(); } @undoBatch -- cgit v1.2.3-70-g09d2