Skip to content

Commit bf185b6

Browse files
committed
update scanning display for ap
1 parent cec49bb commit bf185b6

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/adapter.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,18 @@ impl Adapter {
338338
};
339339

340340
let ap_is_scanning = match self.device.access_point.as_ref() {
341-
Some(ap) => ap.is_scanning.unwrap_or_default(),
342-
None => false,
341+
Some(ap) => {
342+
if ap.has_started {
343+
match ap.is_scanning {
344+
Some(v) => v.to_string(),
345+
None => "-".to_string(),
346+
}
347+
} else {
348+
"-".to_string()
349+
}
350+
}
351+
352+
None => "-".to_string(),
343353
};
344354

345355
let row = Row::new(vec![
@@ -353,7 +363,7 @@ impl Adapter {
353363
ap_name,
354364
ap_frequency,
355365
ap_used_cipher,
356-
ap_is_scanning.to_string(),
366+
ap_is_scanning,
357367
]);
358368

359369
let widths = [

0 commit comments

Comments
 (0)