Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions ui/desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions ui/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7",
"unist-util-visit": "^5.0.0",
"uuid": "^11.1.0",
"yauzl": "^3.0.0"
"uuid": "^11.1.0"
}
}
17 changes: 13 additions & 4 deletions ui/desktop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1220,12 +1220,9 @@ const registerGlobalHotkey = (accelerator: string) => {
};

app.whenReady().then(async () => {
// Register update IPC handlers once
// Register update IPC handlers once (but don't setup auto-updater yet)
registerUpdateIpcHandlers();

// Setup auto-updater if enabled
shouldSetupUpdater() && setupAutoUpdater();

// Add CSP headers to all sessions
session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
callback({
Expand Down Expand Up @@ -1296,6 +1293,18 @@ app.whenReady().then(async () => {

await createNewWindow(app, dirPath);

// Setup auto-updater AFTER window is created and displayed (with delay to avoid blocking)
setTimeout(() => {
if (shouldSetupUpdater()) {
log.info('Setting up auto-updater after window creation...');
try {
setupAutoUpdater();
} catch (error) {
log.error('Error setting up auto-updater:', error);
}
}
}, 2000); // 2 second delay after window is shown

// Get the existing menu
const menu = Menu.getApplicationMenu();

Expand Down