From 22db6a43fa34f5a794b606738264bfbf4095cb08 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sun, 13 Mar 2016 12:56:54 +0100 Subject: [PATCH] Automatically check for updates when changing the update channel. This closes #1611 --- .../ngax/scripts/controllers/SystemSettingsController.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/SystemSettingsController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/SystemSettingsController.js index 4be336752..a2c63cb6a 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/SystemSettingsController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/SystemSettingsController.js @@ -20,6 +20,7 @@ backupApp.controller('SystemSettingsController', function($scope, $location, App $scope.startupDelayDurationValue = data.data['startup-delay'].substr(0, data.data['startup-delay'].length - 1); $scope.startupDelayDurationMultiplier = data.data['startup-delay'].substr(-1); $scope.updateChannel = data.data['update-channel']; + $scope.originalUpdateChannel = data.data['update-channel']; $scope.usageReporterLevel = data.data['usage-reporter-level']; $scope.advancedOptions = AppUtils.serializeAdvancedOptionsToArray(data.data); @@ -55,6 +56,10 @@ backupApp.controller('SystemSettingsController', function($scope, $location, App AppService.patch('/serversettings', patchdata, {headers: {'Content-Type': 'application/json; charset=utf-8'}}).then( function() { + // Check for updates if we changed the channel + if ($scope.updateChannel != $scope.originalUpdateChannel) + AppService.post('/updates/check'); + $location.path('/'); }, AppUtils.connectionError(Localization.localize('Failed to save: '))