From 6c0e493a20baf0e5d55473b22221203465e6b4da Mon Sep 17 00:00:00 2001 From: Tim Cheung Date: Sat, 20 Mar 2021 04:47:22 +0000 Subject: [PATCH] fix update not available when checking manually --- src-main/updates.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src-main/updates.ts b/src-main/updates.ts index 503a2604..8498261a 100644 --- a/src-main/updates.ts +++ b/src-main/updates.ts @@ -59,19 +59,15 @@ export function showUpdateAvailable({ version, releaseNotes }: UpdateInfo) { export async function manuallyCheckForUpdates(): Promise { 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',