sort by connected, strength, then name

pull/36039/head
Shane Smiskol 1 week ago
parent 6362d9de5f
commit ea5e2f7ce0
  1. 1
      system/ui/lib/wifi_manager.py

@ -399,6 +399,7 @@ class WifiManager:
known_connections = self._get_connections() known_connections = self._get_connections()
self._networks = [Network.from_dbus(ssid, ap_list, active_ap_path, self._connection_by_ssid(ssid, known_connections) is not None) self._networks = [Network.from_dbus(ssid, ap_list, active_ap_path, self._connection_by_ssid(ssid, known_connections) is not None)
for ssid, ap_list in aps.items()] for ssid, ap_list in aps.items()]
self._networks.sort(key=lambda n: (-n.is_connected, -n.strength, n.ssid.lower()))
if self._networks_updated is not None: if self._networks_updated is not None:
self._networks_updated(self._networks) self._networks_updated(self._networks)

Loading…
Cancel
Save