gui: Sort already shared devices in edit folder modal (fixes #7940) (#7945)

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.
This commit is contained in:
André Colomb 2021-09-13 20:41:15 +02:00 committed by GitHub
parent 721cd740d8
commit a5792f3c42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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