From 81f9a81c7d14041eb5290c74618b02420d0d0f69 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Thu, 17 May 2018 09:21:10 +0200 Subject: [PATCH] gui: Change rescan interval only if fs watcher was actually toggled (fixes #4944) (#4946) --- gui/default/syncthing/core/syncthingController.js | 6 +++--- gui/default/syncthing/folder/editFolderModalView.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 5523309b..af6ef97f 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1506,13 +1506,13 @@ angular.module('syncthing.core') $scope.currentFolder.path = pathJoin($scope.config.options.defaultFolderPath, newvalue); }); - $scope.$watch('currentFolder.fsWatcherEnabled', function (newvalue) { - if (newvalue) { + $scope.fsWatcherToggled = function () { + if ($scope.currentFolder.fsWatcherEnabled) { $scope.currentFolder.rescanIntervalS = 3600; } else { $scope.currentFolder.rescanIntervalS = 60; } - }); + }; $scope.loadFormIntoScope = function (form) { console.log('loadFormIntoScope',form.$name); diff --git a/gui/default/syncthing/folder/editFolderModalView.html b/gui/default/syncthing/folder/editFolderModalView.html index 69627754..fc5b98f4 100644 --- a/gui/default/syncthing/folder/editFolderModalView.html +++ b/gui/default/syncthing/folder/editFolderModalView.html @@ -139,7 +139,7 @@   Help
-  Watch for Changes +  Watch for Changes