summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Colomb <src@andre.colomb.de>2021-09-13 20:41:15 +0200
committerGitHub <noreply@github.com>2021-09-13 20:41:15 +0200
commita5792f3c42bad56e4df77449e00362ff4ebd3ade (patch)
tree32c70677262391572e8cb3e51febbd14dabf68ba
parent721cd740d84675e7aa87703ac0e37a258b21c753 (diff)
gui: Sort already shared devices in edit folder modal (fixes #7940) (#7945)v1.18.3-rc.1
The list of unshared devices is built from deviceList(), which sorts the result. But the shared devices are listed in undefined order from the unsorted currentFolder.devices array. Apply the same sorting after building the array used in the dialog.
-rwxr-xr-xgui/default/syncthing/core/syncthingController.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js
index 2426b9e490..8bc487264e 100755
--- a/gui/default/syncthing/core/syncthingController.js
+++ b/gui/default/syncthing/core/syncthingController.js
@@ -799,6 +799,7 @@ angular.module('syncthing.core')
}
$scope.currentSharing.selected[n.deviceID] = true;
});
+ $scope.currentSharing.shared.sort(deviceCompare);
$scope.currentSharing.unrelated = $scope.deviceList().filter(function (n) {
return n.deviceID !== $scope.myID && !$scope.currentSharing.selected[n.deviceID];
});