fix(updater): show feedback when check-for-update hits a mid-release draft (#215)
During a mid-release (draft version on GitHub), clicking "Check for Updates" would silently return to idle with no user feedback. Now shows "You're on the latest version" when the fallback confirms no published update is available.
This commit is contained in:
parent
d4ec4cd912
commit
c625ce882e
|
|
@ -130,6 +130,16 @@ async function sendCheckFailureStatus(message: string, userInitiated?: boolean):
|
|||
String((fallbackError as Error)?.message ?? fallbackError)
|
||||
)
|
||||
}
|
||||
|
||||
// The fallback confirmed there is no published version newer than the
|
||||
// current one (the only "newer" entry is a draft mid-release). Tell
|
||||
// the user they're up-to-date so clicking "Check for Updates" doesn't
|
||||
// appear to silently do nothing.
|
||||
if (userInitiated) {
|
||||
clearAvailableUpdateContext()
|
||||
sendStatus({ state: 'not-available', userInitiated: true })
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
console.warn('[updater] benign check failure:', message)
|
||||
|
|
|
|||
Loading…
Reference in New Issue