fix(bluetooth): call pair() for unpaired devices before connecting

This commit is contained in:
Hojjat 2026-03-18 12:51:25 -06:00 committed by Michael Murphy
parent 243d302447
commit 28fb6cc4af

View file

@ -240,6 +240,8 @@ pub async fn connect_device(connection: zbus::Connection, device_path: OwnedObje
let result = async {
if proxy.device.connected().await? {
Ok(())
} else if !proxy.device.paired().await.unwrap_or(false) {
proxy.device.pair().await
} else {
proxy.device.connect().await
}