From 4b227fe8c6edb0144e63297b9fc7dce9d59b339d Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 16 Jun 2021 17:29:47 -0700 Subject: [PATCH] GUACAMOLE-724: Remove client-side "last used" timestamp (no longer needed). The last-used timestamp was previously required to sort active clients within the client panel in a sensible and deterministic order. This now happens automatically via client groups, which are stored in an array in order of last use. No code remains referencing the last-used timestamp. --- .../src/app/client/controllers/clientController.js | 6 ------ .../frontend/src/app/client/types/ManagedClient.js | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js index ca225ab90..8e8318dcb 100644 --- a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js +++ b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js @@ -460,12 +460,6 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams }); - // Update last used timestamp when the active client changes - $scope.$watch('client', function clientChanged(client) { - if (client) - client.lastUsed = new Date().getTime(); - }); - // Update page icon when thumbnail changes $scope.$watch('client.thumbnail.canvas', function thumbnailChanged(canvas) { iconService.setIcons(canvas); 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 3d21b24c3..5da9f1828 100644 --- a/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js +++ b/guacamole/src/main/frontend/src/app/client/types/ManagedClient.js @@ -83,16 +83,6 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', */ this.id = template.id; - /** - * The time that the connection was last brought to the foreground of - * the current tab, as the number of milliseconds elapsed since - * midnight of January 1, 1970 UTC. If the connection has not yet been - * viewed, this will be 0. - * - * @type Number - */ - this.lastUsed = template.lastUsed || 0; - /** * The actual underlying Guacamole client. *