Add timeout to app start and cluster add events

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-12-03 09:16:42 +02:00
1 parent 57d6dfa4b0
commit c1a9cbb619
2 files changed
+4

No files matched your search

+2
View File
@@ -88,7 +88,9 @@ export class WindowManager extends Singleton {
await this.mainWindow.loadURL(this.mainUrl);
this.mainWindow.show();
this.splashWindow?.close();
setTimeout(() => {
appEventBus.emit({ name: "app", action: "start" });
}, 1000);
} catch (err) {
dialog.showErrorBox("ERROR!", err.toString());
}
+2
View File
@@ -61,6 +61,7 @@ export class App extends React.Component {
await requestMain(clusterSetFrameIdHandler, clusterId, frameId);
await getHostedCluster().whenReady; // cluster.activate() is done at this point
extensionLoader.loadOnClusterRenderer();
setTimeout(() => {
appEventBus.emit({
name: "cluster",
action: "open",
@@ -68,6 +69,7 @@ export class App extends React.Component {
clusterId
}
});
});
window.addEventListener("online", () => {
window.location.reload();
});