fix(updater): update function support alpha (#45)

This commit is contained in:
Haze
2026-02-11 13:49:03 +08:00
committed by GitHub
Unverified
parent 0ced0b042c
commit 1267e0cc56
6 changed files with 190 additions and 128 deletions

View File

@@ -151,14 +151,8 @@ async function initialize(): Promise<void> {
// Register update handlers
registerUpdateHandlers(appUpdater, mainWindow);
// Check for updates after a delay (only in production)
if (!process.env.VITE_DEV_SERVER_URL) {
setTimeout(() => {
appUpdater.checkForUpdates().catch((err) => {
console.error('Failed to check for updates:', err);
});
}, 10000);
}
// Note: Auto-check for updates is driven by the renderer (update store init)
// so it respects the user's "Auto-check for updates" setting.
// Handle window close
mainWindow.on('closed', () => {