fix(electron): main window should be opened first before destroying onboard window (#5319)
The issue listed on the title will prevent main window from showing on windows.
This commit is contained in:
8 files changed
+40
-37
No files matched your search
@@ -54,10 +54,17 @@ export const uiHandlers = {
|
||||
launchStage.value = 'main';
|
||||
persistentConfig.patch('onBoarding', false);
|
||||
}
|
||||
initMainWindow().catch(logger.error);
|
||||
getOnboardingWindow()
|
||||
.then(w => w?.destroy())
|
||||
.catch(logger.error);
|
||||
|
||||
try {
|
||||
const onboarding = await getOnboardingWindow();
|
||||
onboarding?.hide();
|
||||
await initMainWindow();
|
||||
// need to destroy onboarding window after main window is ready
|
||||
// otherwise the main window will be closed as well
|
||||
onboarding?.destroy();
|
||||
} catch (err) {
|
||||
logger.error('handleOpenMainApp', err);
|
||||
}
|
||||
},
|
||||
getBookmarkDataByLink: async (_, link: string) => {
|
||||
if (
|
||||
|
||||
Reference in new issue
Block a user