Remove the loading screen

This commit is contained in:
Ben Gotow 2017-06-28 13:26:52 -07:00
parent f74fd8324d
commit 1c64221c12
3 changed files with 6 additions and 64 deletions

View file

@ -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() {

View file

@ -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

File diff suppressed because one or more lines are too long