Skip to content

fix:系统文件对话框关闭后,主窗口自动显示#474

Merged
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
Flinglin:main
May 9, 2026
Merged

fix:系统文件对话框关闭后,主窗口自动显示#474
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
Flinglin:main

Conversation

@Flinglin

@Flinglin Flinglin commented May 9, 2026

Copy link
Copy Markdown
Contributor

在关闭系统文件对话框后,显示主窗口,便于后续操作。例如在添加本地启动后,需要对启动项指定别名。这可能更符合多数用户的使用习惯

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a centralized openDialog utility in windowUtils.ts to replace direct Electron dialog.showOpenDialog calls across multiple renderer API files, standardizing dialog handling and result processing. Review feedback recommends using BrowserWindow instead of BaseWindow for type consistency and adding a safety check to ensure the parent window is not destroyed before calling show(). A non-null assertion for mainWindow in localShortcuts.ts was also suggested for consistency.

Comment thread src/main/utils/windowUtils.ts
Comment thread src/main/utils/windowUtils.ts
Comment thread src/main/api/renderer/localShortcuts.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@lzx8589561 lzx8589561 merged commit 2690bd3 into ZToolsCenter:main May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants