chore: refactor wifi and bluetooth event handlers

This commit is contained in:
Fabio Lenherr / DashieTM 2024-03-11 19:54:29 +01:00
parent 0105956815
commit 0fe99fa3a6
8 changed files with 222 additions and 187 deletions

View file

@ -22,13 +22,8 @@ type ResultType =
pub fn get_connection_settings(path: Path<'static>) -> ResetConnection {
let conn = Connection::new_session().unwrap();
let proxy = conn.with_proxy(
BASE,
DBUS_PATH,
Duration::from_millis(1000),
);
let res: ResultType =
proxy.method_call(WIRELESS, "GetConnectionSettings", (path,));
let proxy = conn.with_proxy(BASE, DBUS_PATH, Duration::from_millis(1000));
let res: ResultType = proxy.method_call(WIRELESS, "GetConnectionSettings", (path,));
if res.is_err() {
ResetConnection::default();
}