Skip to content

Commit

Permalink
Fix Auto-Updater Always Appearing Instead of just when there's an upd…
Browse files Browse the repository at this point in the history
…ate.
  • Loading branch information
LordTocs committed Mar 29, 2022
1 parent e0ac892 commit df5f395
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "castmate",
"version": "0.1.7",
"version": "0.1.8",
"private": "true",
"description": "CastMate is a broadcaster tool that allows Twitch viewers to interact with a broadcasters stream components through Chat Commands, Channel Point rewards, and more.",
"author": "LordTocs & FitzBro",
Expand Down
24 changes: 11 additions & 13 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,20 @@ autoUpdater.on("update-downloaded", () => {
autoUpdater.quitAndInstall();
});

autoUpdater.on("update-available", async (updateInfo) => {
const info = {
releaseDate: updateInfo.releaseDate,
releaseName: updateInfo.releaseName,
releaseNotes: updateInfo.releaseNotes,
version: updateInfo.version
}

await createUpdaterWindow(info);
})

async function doUpdateCheck() {
autoUpdater.autoDownload = false;
const result = await autoUpdater.checkForUpdates();

if (!result)
return;


const updateInfo = {
releaseDate: result.updateInfo.releaseDate,
releaseName: result.updateInfo.releaseName,
releaseNotes: result.updateInfo.releaseNotes,
version: result.updateInfo.version
}

await createUpdaterWindow(updateInfo);
}


Expand Down

0 comments on commit df5f395

Please sign in to comment.