feat: add version string to notification

This commit is contained in:
Zamitto 2024-07-05 12:30:34 -03:00
parent 9e7b27afe6
commit b7f94102da
6 changed files with 14 additions and 6 deletions

View file

@ -21,14 +21,17 @@ const mockValuesForDebug = () => {
sendEvent({ type: "update-downloaded" });
};
const newVersionInfo = { version: "" };
const checkForUpdates = async (_event: Electron.IpcMainInvokeEvent) => {
autoUpdater
.once("update-available", (info: UpdateInfo) => {
sendEvent({ type: "update-available", info });
newVersionInfo.version = info.version;
})
.once("update-downloaded", () => {
sendEvent({ type: "update-downloaded" });
publishNotificationUpdateReadyToInstall();
publishNotificationUpdateReadyToInstall(newVersionInfo.version);
});
if (app.isPackaged) {