mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Show splash window until bundled extensions have been loaded (#4570)
* Show splash window until bundled extensions have been loaded Signed-off-by: Juho Heikka <juho.heikka@gmail.com> * Remove unnecessary variable. Signed-off-by: Juho Heikka <juho.heikka@gmail.com> * Refactor autoInitExtensions Signed-off-by: Juho Heikka <juho.heikka@gmail.com> * Add timeout to waiting for bundled extensions to load Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
This commit is contained in:
1 parent
43277d2af6
commit
9284741df5
5 files changed
+55
-7
No files matched your search
@@ -24,7 +24,7 @@ import { makeObservable, observable } from "mobx";
|
||||
import { app, BrowserWindow, dialog, ipcMain, shell, webContents } from "electron";
|
||||
import windowStateKeeper from "electron-window-state";
|
||||
import { appEventBus } from "../common/event-bus";
|
||||
import { ipcMainOn } from "../common/ipc";
|
||||
import { BundledExtensionsLoaded, ipcMainOn } from "../common/ipc";
|
||||
import { delay, iter, Singleton } from "../common/utils";
|
||||
import { ClusterFrameInfo, clusterFrameMap } from "../common/cluster-frames";
|
||||
import { IpcRendererNavigationEvents } from "../renderer/navigation/events";
|
||||
@@ -181,7 +181,7 @@ export class WindowManager extends Singleton {
|
||||
|
||||
if (!this.mainWindow) {
|
||||
viewHasLoaded = new Promise<void>(resolve => {
|
||||
ipcMain.once(IpcRendererNavigationEvents.LOADED, () => resolve());
|
||||
ipcMain.once(BundledExtensionsLoaded, () => resolve());
|
||||
});
|
||||
await this.initMainWindow(showSplash);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user