gui: Change rescan interval only if fs watcher was actually toggled (fixes #4944) (#4946)

This commit is contained in:
Simon Frei
2018-05-17 09:21:10 +02:00
committed by Jakob Borg
parent 127c891526
commit 81f9a81c7d
2 changed files with 4 additions and 4 deletions

View File

@@ -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);