mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
Show networks with stored passwords on top of list.
This commit is contained in:
parent
d7aa30ecd1
commit
8d53f3f723
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user