Skip to content

Commit

Permalink
add sorting WiFi networks by it's signal strength
Browse files Browse the repository at this point in the history
  • Loading branch information
Chleba committed Mar 12, 2024
1 parent 77ff5ba commit acf87e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/wifi_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ impl WifiScan {
self.wifis.push(w.clone());
}
}
// -- sort wifi networks by it's signal strength
self.wifis.sort_by(|a, b| b.signal.partial_cmp(&a.signal).unwrap());
}

fn app_tick(&mut self) -> Result<()> {
Expand Down

0 comments on commit acf87e4

Please sign in to comment.