fix(load): fix window load timing

Summary:
The app regressed to launching a blank white page for a while before
showing the UI. This was because I forgot to await for the now async
package loading

Test Plan: Manually boot app with compile cache disabled

Reviewers: mark, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3883
This commit is contained in:
Evan Morikawa 2017-02-10 15:52:40 -05:00
parent 3a49bfe448
commit 8a18ac3e14

View file

@ -683,12 +683,12 @@ class NylasEnvConstructor
window.requestAnimationFrame =>
window.requestAnimationFrame =>
@displayWindow() unless initializeInBackground
@startWindow()
# These don't need to wait for the window's stores and such
# to fully activate:
@requireUserInitScript() unless safeMode
@showMainWindow()
ipcRenderer.send('window-command', 'window:loaded')
@startWindow().then =>
# These don't need to wait for the window's stores and
# such to fully activate:
@requireUserInitScript() unless safeMode
@showMainWindow()
ipcRenderer.send('window-command', 'window:loaded')
# Initializes a secondary window.
# NOTE: If the `packageLoadingDeferred` option is set (which is true for