Skip to content

Commit

Permalink
Merge pull request #30 from rezk2ll/manual-update
Browse files Browse the repository at this point in the history
🛠  disabled auto download update (#2286)
  • Loading branch information
rezk2ll authored Aug 23, 2022
2 parents 10f62c2 + 1dc783e commit 10c9fb5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/services/main/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from "../../utils/server";
import { DomainType, ProtocolType, Template } from "./types";
import { download } from "electron-dl";
import { AppUpdater, autoUpdater } from "electron-updater"
import { autoUpdater } from "electron-updater"

type CustomBrowserWindowEntriesType = {
config_disable_buttons?: boolean;
Expand Down Expand Up @@ -296,7 +296,7 @@ class MainService {
app.setBadgeCount(parseInt(arg) || 0);
});

autoUpdater.checkForUpdatesAndNotify();
this.handleUpdateCheck();
};

/**
Expand Down Expand Up @@ -402,12 +402,8 @@ class MainService {
dialog.showMessageBox(this.currentWindow as BrowserWindow, {
type: "info",
title: "Update available",
message: `A new version of Twake is available: ${checkResult.updateInfo.version}.\n\n Would you like to download it now?`,
buttons: ["Download", "Cancel"],
}).then(result => {
if (result.response === 0) {
autoUpdater.downloadUpdate();
}
message: `A new version of Twake is available: ${checkResult.updateInfo.version}`,
buttons: ["ok"],
});
} else {
dialog.showMessageBox(this.currentWindow as BrowserWindow, {
Expand Down

0 comments on commit 10c9fb5

Please sign in to comment.