From 9fe64a77b8794e976eec5b3019ae1c3a9f1b75ef Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Mon, 27 Dec 2021 09:27:07 -0500 Subject: [PATCH] GUACAMOLE-1402: Use new Client state enum in webapp. --- .../frontend/src/app/client/types/ManagedClient.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js b/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js index fb7c8474e..bb21dca13 100644 --- a/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js +++ b/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js @@ -427,25 +427,25 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', switch (clientState) { // Idle - case 0: + case Guacamole.Client.State.IDLE: ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.ConnectionState.IDLE); break; // Connecting - case 1: + case Guacamole.Client.State.CONNECTING: ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.ConnectionState.CONNECTING); break; // Connected + waiting - case 2: + case Guacamole.Client.State.WAITING: ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.ConnectionState.WAITING); break; // Connected - case 3: + case Guacamole.Client.State.CONNECTED: ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.ConnectionState.CONNECTED); @@ -461,9 +461,9 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', ManagedClient.updateThumbnail(managedClient); break; - // Update history when disconnecting - case 4: // Disconnecting - case 5: // Disconnected + // Update history during disconnect phases + case Guacamole.Client.State.DISCONNECTING: + case Guacamole.Client.State.DISCONNECTED: ManagedClient.updateThumbnail(managedClient); break;