Show networks with stored passwords on top of list.

This commit is contained in:
Jonas Diemer 2025-12-23 14:57:30 +01:00
parent d7aa30ecd1
commit 8d53f3f723

View File

@ -150,6 +150,10 @@ void WifiSelectionActivity::processWifiScanResults() {
std::sort(networks.begin(), networks.end(),
[](const WifiNetworkInfo& a, const WifiNetworkInfo& b) { return a.rssi > b.rssi; });
// Show networks with PW first
std::sort(networks.begin(), networks.end(),
[](const WifiNetworkInfo& a, const WifiNetworkInfo& b) { return a.hasSavedPassword && !b.hasSavedPassword; });
WiFi.scanDelete();
state = WifiSelectionState::NETWORK_LIST;
selectedNetworkIndex = 0;