aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-09-26 22:17:15 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-09-26 22:17:15 -0400
commit20540a35be82c34cc3962de4f957d1aa43f8a2b0 (patch)
treea4d67686a1d323bab947fcf3a6d6c2575b576c3e /src/client/views/nodes/DocumentView.tsx
parente95387732e1fbff49ec035c3bec4b03324d814c8 (diff)
finally transferred google credential management to database
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx7
1 files changed, 4 insertions, 3 deletions
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<DocumentViewProps, Document>(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<void> => swapViews(doc, "layoutNative", "layoutCustom")
- @undoBatch
static makeCustomViewClicked = async (doc: Doc, dataDoc: Opt<Doc>) => {
+ 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<DocumentViewProps, Document>(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