From 801e9b57eb1a7a24c3ec0b00a5bae33b8748c89a Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Sun, 13 Jan 2019 23:28:17 +0000 Subject: [PATCH] Update config (#5444) * gui: Update config from remote after saving (fixes #5354) * Refresh is async :( --- gui/default/syncthing/core/syncthingController.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index ef8993be1..df0aa688d 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1211,13 +1211,14 @@ angular.module('syncthing.core') } }; $http.post(urlbase + '/system/config', cfg, opts).success(function () { - $http.get(urlbase + '/system/config/insync').success(function (data) { - $scope.configInSync = data.configInSync; - if (cb) { - cb(); - } - }); - }).error($scope.emitHTTPError); + refreshConfig(); + if (cb) { + cb(); + } + }).error(function (data, status, headers, config) { + refreshConfig(); + $scope.emitHTTPError(data, status, headers, config); + }); }; $scope.urVersions = function () {