jmuehlner commented on code in PR #942:
URL: https://github.com/apache/guacamole-client/pull/942#discussion_r1457902181


##########
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:
   Ok - new approach - we can just broadcast all these events directly from the 
root scope, which obviates these duplicated event names entirely. Any consumer 
can just `$scope.$on()` them as before. How does this look?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to