1
0
mirror of https://github.com/rhysd/Mstdn.git synced 2025-02-02 06:52:13 +01:00

delay showing a window until DOM is ready

This commit is contained in:
rhysd 2017-04-17 14:56:50 +09:00
parent cf8d587248
commit b23723ecf3

View File

@ -21,6 +21,9 @@ export class App {
}
open() {
this.win.webContents.on('dom-ready', () => {
this.win.show();
});
this.win.loadURL(`https://${this.account.host}${this.account.default_page}`);
this.win.webContents.on('will-navigate', (e, url) => {
if (!url.startsWith(`https://${this.account.host}`)) {
@ -49,7 +52,6 @@ export class App {
callback(granted);
});
});
this.win.show();
}
}