mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add timeout to app start and cluster add events (#1631)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
31e914bbef
commit
f95c2d1c91
@ -88,7 +88,9 @@ export class WindowManager extends Singleton {
|
|||||||
await this.mainWindow.loadURL(this.mainUrl);
|
await this.mainWindow.loadURL(this.mainUrl);
|
||||||
this.mainWindow.show();
|
this.mainWindow.show();
|
||||||
this.splashWindow?.close();
|
this.splashWindow?.close();
|
||||||
appEventBus.emit({ name: "app", action: "start" });
|
setTimeout(() => {
|
||||||
|
appEventBus.emit({ name: "app", action: "start" });
|
||||||
|
}, 1000);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
dialog.showErrorBox("ERROR!", err.toString());
|
dialog.showErrorBox("ERROR!", err.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,12 +61,14 @@ export class App extends React.Component {
|
|||||||
await requestMain(clusterSetFrameIdHandler, clusterId, frameId);
|
await requestMain(clusterSetFrameIdHandler, clusterId, frameId);
|
||||||
await getHostedCluster().whenReady; // cluster.activate() is done at this point
|
await getHostedCluster().whenReady; // cluster.activate() is done at this point
|
||||||
extensionLoader.loadOnClusterRenderer();
|
extensionLoader.loadOnClusterRenderer();
|
||||||
appEventBus.emit({
|
setTimeout(() => {
|
||||||
name: "cluster",
|
appEventBus.emit({
|
||||||
action: "open",
|
name: "cluster",
|
||||||
params: {
|
action: "open",
|
||||||
clusterId
|
params: {
|
||||||
}
|
clusterId
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
window.addEventListener("online", () => {
|
window.addEventListener("online", () => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user