From 8372c0288f6695c781ba6030220825ace2b25f87 Mon Sep 17 00:00:00 2001 From: tomasz1986 Date: Tue, 8 Apr 2025 22:08:00 +0200 Subject: [PATCH] fix(gui): mark unseen disconnected devices as inactive (#10048) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the "Disconnected (Inactive)" status is only given to devices that have not been seen for 7 days or longer. However, this is not the case when adding a new device, or after resetting the database. Those devices are only marked as "Disconnected", and they will stay like that even if a long time passes without any connectivity. Moreover, the lack of an "Inactive" status may confuse the user to believe that their disconnect is only temporary. For this reason, always mark devices that have not been seen yet as "Disconnected (Inactive)". Signed-off-by: Tomasz WilczyƄski --- gui/default/syncthing/core/syncthingController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index a7ac07d5d..05fc80e74 100644 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1165,7 +1165,7 @@ angular.module('syncthing.core') } // Disconnected - if (!unused && $scope.deviceStats[deviceCfg.deviceID] && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays >= 7) { + if (!unused && $scope.deviceStats[deviceCfg.deviceID] && (!$scope.deviceStats[deviceCfg.deviceID].lastSeenDays || ($scope.deviceStats[deviceCfg.deviceID].lastSeenDays && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays >= 7)) { return status + 'disconnected-inactive'; } else { return status + 'disconnected';