From 3928d483d4bf10eca83a0cebc12f8a16dba239bb Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 21 Jul 2025 14:17:35 +1200 Subject: [PATCH] Custom update message when auto update disabled --- materialious/electron/src/index.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/materialious/electron/src/index.ts b/materialious/electron/src/index.ts index 18732565..9b395569 100644 --- a/materialious/electron/src/index.ts +++ b/materialious/electron/src/index.ts @@ -166,8 +166,16 @@ ipcMain.handle('setAllowInsecureSSL', async (_, allow) => { return allowInsecureSSL; }); -ipcMain.handle('doUpdateCheck', (_, disableAutoUpdate) => { +ipcMain.handle('doUpdateCheck', async (_, disableAutoUpdate) => { // Check for updates if we are in a packaged app. - autoUpdater.autoInstallOnAppQuit = !disableAutoUpdate - autoUpdater.checkForUpdatesAndNotify(); -}) + autoUpdater.autoInstallOnAppQuit = !disableAutoUpdate; + + if (disableAutoUpdate) { + await autoUpdater.checkForUpdatesAndNotify({ + title: 'Update Available', + body: 'A new version is available.' + }); + } else { + await autoUpdater.checkForUpdatesAndNotify(); + } +});