diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index d57989c52..163277f2c 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1186,13 +1186,17 @@ angular.module('syncthing.core') return $http.get(urlbase + '/system/discovery') .success(function (registry) { $scope.discovery = []; + outer: for (var id in registry) { if ($scope.discovery.length === 5) { break; } - if (!(id in $scope.devices)) { - $scope.discovery.push(id); + for (var i = 0; i < $scope.devices.length; i++) { + if ($scope.devices[i].deviceID === id) { + continue outer; + } } + $scope.discovery.push(id); } }) .then(function () { diff --git a/gui/default/syncthing/device/editDeviceModalView.html b/gui/default/syncthing/device/editDeviceModalView.html index 1f4c068cd..55737c70d 100644 --- a/gui/default/syncthing/device/editDeviceModalView.html +++ b/gui/default/syncthing/device/editDeviceModalView.html @@ -3,24 +3,26 @@