feat: Add ability to show bluetooth devices immediately

This commit is contained in:
dashie 2024-04-04 10:54:20 +02:00
parent 5f0781ee18
commit a8aca57ea1
7 changed files with 85 additions and 70 deletions

View file

@ -116,7 +116,7 @@ pub fn scan_for_wifi(wifi_box: Arc<WifiBox>) {
if devices.is_empty() {
return;
}
let access_points = get_access_points(wifibox_ref.clone());
let access_points = get_access_points(wifi_box.clone());
{
let imp = wifibox_ref.imp();
let list = imp.reset_model_list.write().unwrap();
@ -251,6 +251,7 @@ pub fn get_wifi_devices(wifi_box: Arc<WifiBox>) -> Vec<WifiDevice> {
let res: Result<(Vec<WifiDevice>,), Error> =
proxy.method_call(WIRELESS, "GetAllWifiDevices", ());
if res.is_err() {
dbg!(&res);
show_error::<WifiBox>(wifi_box.clone(), "Failed to get WiFi devices");
return Vec::new();
}