mike-jumper commented on code in PR #942:
URL: https://github.com/apache/guacamole-client/pull/942#discussion_r1456694064


##########
guacamole/src/main/frontend/src/app/client/controllers/clientController.js:
##########
@@ -485,17 +498,23 @@ angular.module('client').controller('clientController', 
['$scope', '$routeParams
         $scope.menu.connectionParameters = newFocusedClient ?
             ManagedClient.getArgumentModel(newFocusedClient) : {};
 
+        // Re-broadcast the updated client
+        $scope.$broadcast('guacClientChanged'. newFocusedClient);

Review Comment:
   Looks like that `.` was meant as a comma here.



##########
guacamole/src/main/frontend/src/app/client/controllers/clientController.js:
##########
@@ -485,17 +498,23 @@ angular.module('client').controller('clientController', 
['$scope', '$routeParams
         $scope.menu.connectionParameters = newFocusedClient ?
             ManagedClient.getArgumentModel(newFocusedClient) : {};
 
+        // Re-broadcast the updated client
+        $scope.$broadcast('guacClientChanged'. newFocusedClient);
+
     });
 
     // Automatically update connection parameters that have been modified
     // for the current focused client
     $scope.$on('guacClientArgumentsUpdated', function 
focusedClientChanged(event, focusedClient) {
 
-        // Update available connection parameters, if the updated arguments are
-        // for the current focused client - otherwise ignore them
-        if ($scope.focusedClient && $scope.focusedClient === focusedClient)
+        // Ignore any updated arguments not for the current focused client
+        if ($scope.focusedClient && $scope.focusedClient === focusedClient) {
             $scope.menu.connectionParameters = 
ManagedClient.getArgumentModel(focusedClient);
 
+            // Re-broadcast the updated arguments
+            $scope.$broadcast('guacClientArgumentsChanged'. focusedClient);

Review Comment:
   Same here: `.` probably means as a comma.



##########
guacamole/src/main/frontend/src/app/client/controllers/clientController.js:
##########
@@ -485,17 +498,23 @@ angular.module('client').controller('clientController', 
['$scope', '$routeParams
         $scope.menu.connectionParameters = newFocusedClient ?
             ManagedClient.getArgumentModel(newFocusedClient) : {};
 
+        // Re-broadcast the updated client
+        $scope.$broadcast('guacClientChanged'. newFocusedClient);
+
     });
 
     // Automatically update connection parameters that have been modified
     // for the current focused client
     $scope.$on('guacClientArgumentsUpdated', function 
focusedClientChanged(event, focusedClient) {
 
-        // Update available connection parameters, if the updated arguments are
-        // for the current focused client - otherwise ignore them
-        if ($scope.focusedClient && $scope.focusedClient === focusedClient)
+        // Ignore any updated arguments not for the current focused client
+        if ($scope.focusedClient && $scope.focusedClient === focusedClient) {
             $scope.menu.connectionParameters = 
ManagedClient.getArgumentModel(focusedClient);
 
+            // Re-broadcast the updated arguments
+            $scope.$broadcast('guacClientArgumentsChanged'. focusedClient);

Review Comment:
   Is there a way that `guacClientArgumentsUpdated` and 
`guacClientArgumentsChanged` might be renamed to avoid confusing the two?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to