Skip to content

Commit

Permalink
fix: update auto-update version and settings
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Mar 25, 2022
1 parent f0990f1 commit b0b7c92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions app/bg/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,9 @@ async function doTest(test) {}
// =

function getSenderTab(sender) {
let tab = tabManager.findTab(sender);
const tab = tabManager.findTab(sender);
if (tab) return tab;
var win = findWebContentsParentWindow(sender);
const win = findWebContentsParentWindow(sender);
return tabManager.getActive(win);
}

Expand All @@ -857,6 +857,7 @@ function getAutoUpdaterFeedSettings() {
repo: 'knownasilya',
owner: 'nomad',
vPrefixedTagName: true,
private: false,
};
}

Expand Down Expand Up @@ -899,7 +900,7 @@ function onUpdateError(e) {
logger.error(`[AUTO-UPDATE] error: ${e.toString()}`);
setUpdaterState(UPDATER_STATUS_IDLE);

var message = (e.toString() || '').split('\n')[0];
let message = (e.toString() || '').split('\n')[0];
if (message.includes('[object Object]')) {
message =
typeof e.message === 'string'
Expand All @@ -923,15 +924,16 @@ function onWebContentsCreated(e, webContents) {
}

function onWillPreventUnload(e) {
var choice = dialog.showMessageBoxSync({
const choice = dialog.showMessageBoxSync({
type: 'question',
buttons: ['Leave', 'Stay'],
title: 'Do you want to leave this site?',
message: 'Changes you made may not be saved.',
defaultId: 0,
cancelId: 1,
});
var leave = choice === 0;
const leave = choice === 0;

if (leave) {
e.preventDefault();
}
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"diff-file-tree": "^2.5.0",
"discovery-swarm": "^6.0.0",
"electron-is-accelerator": "^0.1.2",
"electron-updater": "^4.0.0",
"electron-updater": "^4.6.5",
"emit-stream": "^0.1.2",
"emoji-regex": "^8.0.0",
"fs-jetpack": "^1.3.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"lint": "eslint --ignore-pattern 'color-thief.js' --ignore-pattern 'app/node_modules' --ignore-pattern 'vendor' --ignore-pattern '*.build.js' --ignore-pattern 'assets' --fix app",
"rebuild": "gulp rebuild",
"prerelease": "npm run build",
"release": "electron-builder -p never && gulp postbuild",
"release": "electron-builder -p onTagOrDraft",
"start": "gulp start",
"watch": "gulp start-watch"
},
Expand Down

0 comments on commit b0b7c92

Please sign in to comment.