fix (network): reversed order of WAPs

Don't use `sort_by_key` when wanting a descending order search...
This commit is contained in:
Cheong Lau 2025-10-22 19:45:07 +10:00 • committed by Ashley Wulber
parent 5369b4eb29
commit 3835133af1

View file

@ -631,7 +631,7 @@ impl NetworkManagerState {
}) })
.cloned() .cloned()
.collect(); .collect();
wireless_access_points.sort_by_key(|ap| ap.strength); wireless_access_points.sort_by(|a, b| b.strength.cmp(&a.strength));
self_.wireless_access_points = wireless_access_points; self_.wireless_access_points = wireless_access_points;
for ap in &self_.wireless_access_points { for ap in &self_.wireless_access_points {
tracing::info!( tracing::info!(