From 1e1021685619cf2c66554e05f52831cefd0f026c Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 18 Sep 2019 12:37:21 +0200 Subject: [PATCH] trigger sync after closing the conflicts editor --- build/lib/i18n.resources.json | 4 ++++ .../browser/userDataSync.contribution.ts | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json index e8301efbeca..1987d5ca9c0 100644 --- a/build/lib/i18n.resources.json +++ b/build/lib/i18n.resources.json @@ -186,6 +186,10 @@ "name": "vs/workbench/contrib/outline", "project": "vscode-workbench" }, + { + "name": "vs/workbench/contrib/userDataSync", + "project": "vscode-workbench" + }, { "name": "vs/workbench/services/actions", "project": "vscode-workbench" diff --git a/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.ts b/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.ts index b3c153261d4..df9bc5323a5 100644 --- a/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.ts +++ b/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.ts @@ -153,7 +153,17 @@ class SyncActionsContribution extends Disposable implements IWorkbenchContributi }, mode: 'jsonc' }; - this.editorService.openEditor(resourceInput).then(() => this.historyService.remove(resourceInput)); + this.editorService.openEditor(resourceInput) + .then(editor => { + this.historyService.remove(resourceInput); + if (editor && editor.input) { + // Trigger sync after closing the conflicts editor. + const disposable = editor.input.onDispose(() => { + disposable.dispose(); + this.userDataSyncService.sync(true); + }); + } + }); } } -- GitLab