From 833b3b0ab0335ff2be3ecdfe804c878772635e45 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 20 Sep 2016 16:10:11 -0700 Subject: [PATCH] Save state when reloading AtomWindow Signed-off-by: Nathan Sobo --- spec/main-process/atom-application.test.js | 1 - src/main-process/atom-window.coffee | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/main-process/atom-application.test.js b/spec/main-process/atom-application.test.js index 914c1cead..0e5810aad 100644 --- a/spec/main-process/atom-application.test.js +++ b/spec/main-process/atom-application.test.js @@ -326,7 +326,6 @@ describe('AtomApplication', function () { }) assert.deepEqual(directories, [{type: 'FakeRemoteDirectory', path: remotePath}]) - await window.saveState() await window.reload() await focusWindow(window) directories = await evalInWebContents(window.browserWindow.webContents, function (sendBackToMainProcess) { diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index 5802bdf8d..876a18d13 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -257,7 +257,7 @@ class AtomWindow reload: -> @applicationStartedPromise = new Promise (resolve) => @browserWindow.once('window:application-started', resolve) - @browserWindow.reload() + @saveState().then => @browserWindow.reload() @applicationStartedPromise toggleDevTools: -> @browserWindow.toggleDevTools()