Skip to content

Commit

Permalink
fix update not available when checking manually
Browse files Browse the repository at this point in the history
  • Loading branch information
timche committed Mar 20, 2021
1 parent 4f326ca commit 6c0e493
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src-main/updates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,15 @@ export function showUpdateAvailable({ version, releaseNotes }: UpdateInfo) {
export async function manuallyCheckForUpdates(): Promise<void> {
try {
const { updateInfo } = await autoUpdater.checkForUpdates()
const currentVersion = app.getVersion()

if (!updateInfo) {
if (updateInfo.version === currentVersion) {
dialog.showMessageBox({
type: 'info',
message: `You're up to date!`,
detail: `${
app.name
} ${app.getVersion()} is currently the newest version available.`
detail: `${app.name} v${currentVersion} is currently the newest version available.`
})
return
}

showUpdateAvailable(updateInfo)
} catch (error: unknown) {
dialog.showMessageBox({
type: 'info',
Expand Down

0 comments on commit 6c0e493

Please sign in to comment.