mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-19 12:47:25 +08:00
desktop: make backend port deterministic (fixed + pre-launch cleanup) and reorder footer menu
This commit is contained in:
@@ -51,9 +51,14 @@ export function initUpdater(windowGetter: () => BrowserWindow | null): void {
|
||||
)
|
||||
}
|
||||
|
||||
// Silent check shortly after launch; safe to call when not packaged (no-op).
|
||||
// Silent check shortly after launch. When not packaged there's no update feed,
|
||||
// but a manual click should still get visible feedback instead of looking dead:
|
||||
// reply "not-available" so the menu can show "up to date".
|
||||
export function checkForUpdates(): void {
|
||||
if (!app.isPackaged) return
|
||||
if (!app.isPackaged) {
|
||||
send({ state: 'not-available' })
|
||||
return
|
||||
}
|
||||
autoUpdater.checkForUpdates().catch((err) => {
|
||||
send({ state: 'error', message: err?.message || String(err) })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user