From 2b627fe4ab650559ceb82c202a22355d8fea81f0 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 31 Jan 2018 19:34:38 +0000 Subject: [PATCH] Fixed auto-update check --- ElectronClient/app/app.js | 11 +++++++---- ...v-app-update.yml => dev-app-update.yml-FORTESTING} | 0 2 files changed, 7 insertions(+), 4 deletions(-) rename ElectronClient/app/{dev-app-update.yml => dev-app-update.yml-FORTESTING} (100%) diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index deda6d7274..e8dcf10a3f 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -43,13 +43,16 @@ class Application extends BaseApplication { constructor() { super(); this.lastMenuScreen_ = null; - this.checkForUpdateLoggerPath_ = Setting.value('profileDir') + '/log-autoupdater.txt'; } hasGui() { return true; } + checkForUpdateLoggerPath() { + return Setting.value('profileDir') + '/log-autoupdater.txt'; + } + reducer(state = appDefaultState, action) { let newState = state; @@ -298,7 +301,7 @@ class Application extends BaseApplication { }, { label: _('Check for updates...'), click: () => { - bridge().checkForUpdates(false, this.checkForUpdateLoggerPath_); + bridge().checkForUpdates(false, this.checkForUpdateLoggerPath()); } }, { label: _('About Joplin'), @@ -391,9 +394,9 @@ class Application extends BaseApplication { // Note: Auto-update currently doesn't work in Linux: it downloads the update // but then doesn't install it on exit. if (shim.isWindows() || shim.isMac()) { - const runAutoUpdateCheck = function() { + const runAutoUpdateCheck = () => { if (Setting.value('autoUpdateEnabled')) { - bridge().checkForUpdates(true, this.checkForUpdateLoggerPath_); + bridge().checkForUpdates(true, this.checkForUpdateLoggerPath()); } } diff --git a/ElectronClient/app/dev-app-update.yml b/ElectronClient/app/dev-app-update.yml-FORTESTING similarity index 100% rename from ElectronClient/app/dev-app-update.yml rename to ElectronClient/app/dev-app-update.yml-FORTESTING