Fix: prevent event loop error in ROGCC

Leftover code from parts of the refactor and tray crate change were
causing the app to crash due to the UI trying to issue a command on the
slint thread when the slint thread had not been created yet.

Closes #579
This commit is contained in:
Luke D. Jones
2024-12-28 22:02:18 +13:00
parent 98dc155e41
commit d40f4733e2
7 changed files with 23 additions and 88 deletions

View File

@@ -151,6 +151,7 @@ where
}
if !paths.is_empty() {
let mut ctrl = Vec::new();
paths.sort_by(|a, b| a.cmp(&b));
for path in paths {
ctrl.push(
T::builder(&conn)
@@ -1089,7 +1090,11 @@ fn handle_platform_new_properties(
let attrs = attr.available_attrs()?;
// dbg!(&name, &attrs);
println!("{name}::");
if attrs.contains(&"defalt_value".to_string()) {
if attrs.contains(&"current_value".to_string()) {
let v = attr.current_value()?;
println!(" current_value: {v}");
}
if attrs.contains(&"default_value".to_string()) {
let v = attr.default_value()?;
println!(" default_value: {v:?}");
}
@@ -1101,18 +1106,10 @@ fn handle_platform_new_properties(
let v = attr.max_value()?;
println!(" max_value: {v}");
}
if attrs.contains(&"scalar_increment".to_string()) {
let v = attr.scalar_increment()?;
println!(" scalar_increment: {v}");
}
if attrs.contains(&"possible_values".to_string()) {
let v = attr.possible_values()?;
println!(" possible_values: {v:?}");
}
if attrs.contains(&"current_value".to_string()) {
let v = attr.current_value()?;
println!(" current_value: {v}");
}
}
}
}