diff --git a/packages/client-app/spec/n1-spec-runner/n1-spec-runner.es6 b/packages/client-app/spec/n1-spec-runner/n1-spec-runner.es6 index 1c2eee28c..984bf2fc2 100644 --- a/packages/client-app/spec/n1-spec-runner/n1-spec-runner.es6 +++ b/packages/client-app/spec/n1-spec-runner/n1-spec-runner.es6 @@ -165,7 +165,6 @@ class N1SpecRunner { document.body.appendChild(div); document.querySelector('html').style.overflow = 'initial'; document.querySelector('body').style.overflow = 'initial'; - document.getElementById("application-loading-cover").remove(); } _extendJasmineMethods() { diff --git a/packages/client-app/src/nylas-env.es6 b/packages/client-app/src/nylas-env.es6 index 8c0e814d7..65b9cc9a5 100644 --- a/packages/client-app/src/nylas-env.es6 +++ b/packages/client-app/src/nylas-env.es6 @@ -870,27 +870,10 @@ export default class NylasEnvConstructor { // Call this method when establishing a real application window. startRootWindow() { - const {safeMode, initializeInBackground} = this.getLoadSettings(); - - // Temporary. It takes five paint cycles for all the CSS in index.html to - // be applied. Remove if https://github.com/atom/brightray/issues/196 fixed! - return window.requestAnimationFrame(() => { - return window.requestAnimationFrame(() => { - return window.requestAnimationFrame(() => { - return window.requestAnimationFrame(() => { - return window.requestAnimationFrame(() => { - if (!initializeInBackground) { this.displayWindow(); } - return this.startWindow().then(() => { - // These don't need to wait for the window's stores and - // such to fully activate: - if (!safeMode) { this.requireUserInitScript(); } - this.showMainWindow(); - return ipcRenderer.send('window-command', 'window:loaded'); - }); - }); - }); - }); - }); + this.restoreWindowDimensions(); + this.getCurrentWindow().setMinimumSize(875, 250); + this.startWindow().then(() => { + ipcRenderer.send('window-command', 'window:loaded'); }); } @@ -899,13 +882,10 @@ export default class NylasEnvConstructor { // hot windows), the packages won't be loaded until `populateHotWindow` // gets fired. startSecondaryWindow() { - const elt = document.getElementById("application-loading-cover"); - if (elt) elt.remove(); - - return this.startWindow().then(() => { + this.startWindow().then(() => { this.initializeBasicSheet(); ipcRenderer.on("load-settings-changed", this.populateHotWindow); - return ipcRenderer.send('window-command', 'window:loaded'); + ipcRenderer.send('window-command', 'window:loaded'); } ); } @@ -922,13 +902,6 @@ export default class NylasEnvConstructor { } } - showMainWindow() { - document.getElementById("application-loading-cover").remove(); - document.body.classList.add("window-loaded"); - this.restoreWindowDimensions(); - return this.getCurrentWindow().setMinimumSize(875, 250); - } - // Updates the window load settings - called when the app is ready to // display a hot-loaded window. Causes listeners registered with // `onWindowPropsReceived` to receive new window props. @@ -1195,17 +1168,6 @@ export default class NylasEnvConstructor { return initScriptPath != null ? initScriptPath : path.join(this.getConfigDirPath(), 'init.coffee'); } - requireUserInitScript() { - const userInitScriptPath = this.getUserInitScriptPath(); - if (userInitScriptPath) { - try { - if (fs.isFileSync(userInitScriptPath)) { require(userInitScriptPath); } - } catch (error) { - console.log(error); - } - } - } - // Require the module with the given globals. // // The globals will be set on the `window` object and removed after the diff --git a/packages/client-app/static/index.html b/packages/client-app/static/index.html index d405a5b58..dd1810691 100644 --- a/packages/client-app/static/index.html +++ b/packages/client-app/static/index.html @@ -5,27 +5,8 @@ - -
-