Skip to content

sharing: Fix visual bug for active indicators

The switch for the current network was only updated to TRUE after a network change. However, if a new network was not enabled, the switch should be set to FALSE. This is now properly handled.

Screenshot 1 shows what happens after switching from an enabled network (Ma...) to a not yet enabled network (AM...) with this window open. The current network switch appears glitchy now, as the actual state is off in fact. Going to another panel and back to Sharing resets this visual bug.

Screenshot 1
Screenshot_from_2023-04-25_01-49-57

Furthermore, the Off/Enabled/Active indicator was also inconsistent after network changes due to the is_visible check failing sometimes, even after changing to an already enabled network. Because the actual current network state is now better tracked, we can just check the state of the switch instead.

Screenshot 2 shows what happens after switching from an enabled network to no network, and back again. It still shows "Enabled", even though it should be "Active". Going to another panel and back to Sharing resets this too.

Screenshot 2
Screenshot_from_2023-04-25_01-50-50

The fixes just make sure a network switch while the Sharing panel is open is correctly handled now. I haven't found an issue filed for this problem, but I noticed it while testing my fix from !1751 (merged).

Edited by Matthijs Velsink

Merge request reports