Repository: syncthing/syncthing (language: go)

Issue:
Favicon is stuck in notify state
As discussed in the forum: https://forum.syncthing.net/t/favicon-notification-breakdown-sticky-black-exclamation-mark-across-browsers/20882/7

https://github.com/syncthing/syncthing/pull/8918 removed the connection entry for the device itself:

https://github.com/syncthing/syncthing/blob/4f6b86a1c09b99aeb239d49c92ea7036f7a24e9e/lib/model/model.go#L745-L747

But this entry is required for the UI to properly determine the status of the device itself:

https://github.com/syncthing/syncthing/blob/4f6b86a1c09b99aeb239d49c92ea7036f7a24e9e/gui/default/syncthing/core/syncthingController.js#L1076-L1078
Favicon is stuck in notify state
As discussed in the forum: https://forum.syncthing.net/t/favicon-notification-breakdown-sticky-black-exclamation-mark-across-browsers/20882/7

https://github.com/syncthing/syncthing/pull/8918 removed the connection entry for the device itself:

https://github.com/syncthing/syncthing/blob/4f6b86a1c09b99aeb239d49c92ea7036f7a24e9e/lib/model/model.go#L745-L747

But this entry is required for the UI to properly determine the status of the device itself:

https://github.com/syncthing/syncthing/blob/4f6b86a1c09b99aeb239d49c92ea7036f7a24e9e/gui/default/syncthing/core/syncthingController.js#L1076-L1078


Discussion / hints:
The place calling `$scope.deviceStatus` should skip the local device.
The place calling `$scope.deviceStatus` should skip the local device.

Fix patch:
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js
index b09965f9f8a..e92b0ab66e6 100755
--- a/gui/default/syncthing/core/syncthingController.js
+++ b/gui/default/syncthing/core/syncthingController.js
@@ -1144,6 +1144,9 @@ angular.module('syncthing.core')
             // loop through all devices
             var deviceCount = 0;
             for (var id in $scope.devices) {
+                if (id === $scope.myID) {
+                    continue
+                }
                 var status = $scope.deviceStatus({
                     deviceID: id
                 });
@@ -1176,8 +1179,8 @@ angular.module('syncthing.core')
                 return 'notify';
             }
 
-            // all used devices are paused except (this) one
-            if (pauseCount === deviceCount - 1) {
+            // all used devices are paused
+            if (pauseCount === deviceCount && deviceCount > 0) {
                 return 'pause';
             }
 


Test patch: