aboutsummaryrefslogtreecommitdiffstats
path: root/src/electron/ipc-api/autoUpdate.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-12 01:26:51 +0530
committerLibravatar GitHub <noreply@github.com>2021-05-11 21:56:51 +0200
commit80d7ef19dbb4271416bd8b5bbf938e180c57e5f3 (patch)
treeec99db3b3b0727d7ac81c1ead70e17db0c1bb6b3 /src/electron/ipc-api/autoUpdate.js
parentFixing issue with icons being garbled due to misconfiguration of gulp (diff)
downloadferdium-app-80d7ef19dbb4271416bd8b5bbf938e180c57e5f3.tar.gz
ferdium-app-80d7ef19dbb4271416bd8b5bbf938e180c57e5f3.tar.zst
ferdium-app-80d7ef19dbb4271416bd8b5bbf938e180c57e5f3.zip
Method reuse (#1379)
* Used already exported common functions to avoid the same logic being repeated. * Use a different package to retrieve the os-name for the 'About Dialog'.
Diffstat (limited to 'src/electron/ipc-api/autoUpdate.js')
-rw-r--r--src/electron/ipc-api/autoUpdate.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/electron/ipc-api/autoUpdate.js b/src/electron/ipc-api/autoUpdate.js
index a81bc918f..ec7fa9d8a 100644
--- a/src/electron/ipc-api/autoUpdate.js
+++ b/src/electron/ipc-api/autoUpdate.js
@@ -1,5 +1,6 @@
1import { app, ipcMain } from 'electron'; 1import { app, ipcMain } from 'electron';
2import { autoUpdater } from 'electron-updater'; 2import { autoUpdater } from 'electron-updater';
3import { isMac, isWindows } from '../../environment';
3 4
4const debug = require('debug')('Ferdi:ipcApi:autoUpdate'); 5const debug = require('debug')('Ferdi:ipcApi:autoUpdate');
5 6
@@ -9,7 +10,7 @@ export default (params) => {
9 if (!enableUpdate) { 10 if (!enableUpdate) {
10 autoUpdater.autoInstallOnAppQuit = false; 11 autoUpdater.autoInstallOnAppQuit = false;
11 autoUpdater.autoDownload = false; 12 autoUpdater.autoDownload = false;
12 } else if (process.platform === 'darwin' || process.platform === 'win32' || process.env.APPIMAGE) { 13 } else if (isMac || isWindows || process.env.APPIMAGE) {
13 ipcMain.on('autoUpdate', (event, args) => { 14 ipcMain.on('autoUpdate', (event, args) => {
14 if (enableUpdate) { 15 if (enableUpdate) {
15 try { 16 try {