manager/user: Combine redundant checks

This commit is contained in:
Vicki Pfau 2025-07-08 15:00:34 -07:00
parent 084dd84ed7
commit 30a0a40279

View file

@ -1111,12 +1111,6 @@ pub(crate) async fn create_interfaces(
channel: daemon,
};
let screen_reader = ScreenReader0::new(&session).await?;
let wifi_debug = WifiDebug1 {
proxy: proxy.clone(),
};
let wifi_debug_dump = WifiDebugDump1 {
proxy: proxy.clone(),
};
let wifi_power_management = WifiPowerManagement1 {
proxy: proxy.clone(),
};
@ -1131,6 +1125,13 @@ pub(crate) async fn create_interfaces(
object_server.at(MANAGER_PATH, als).await?;
}
if steam_deck_variant().await.unwrap_or_default() == SteamDeckVariant::Galileo {
let wifi_debug = WifiDebug1 {
proxy: proxy.clone(),
};
let wifi_debug_dump = WifiDebugDump1 {
proxy: proxy.clone(),
};
object_server.at(MANAGER_PATH, wifi_debug).await?;
object_server.at(MANAGER_PATH, wifi_debug_dump).await?;
}
@ -1168,10 +1169,6 @@ pub(crate) async fn create_interfaces(
object_server.at(MANAGER_PATH, screen_reader).await?;
}
if steam_deck_variant().await.unwrap_or_default() == SteamDeckVariant::Galileo {
object_server.at(MANAGER_PATH, wifi_debug).await?;
}
if !list_wifi_interfaces().await.unwrap_or_default().is_empty() {
object_server
.at(MANAGER_PATH, wifi_power_management)