diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/src/ui/main/mod.rs b/src/ui/main/mod.rs index 174090d..3fbf1e5 100644 --- a/src/ui/main/mod.rs +++ b/src/ui/main/mod.rs @@ -387,7 +387,7 @@ impl SimpleComponent for App { }, #[watch] - set_sensitive: match model.state.as_ref() { + set_sensitive: !model.disabled_buttons && match &model.state { Some(LauncherState::GameOutdated { .. }) | Some(LauncherState::VoiceOutdated(_)) => false, @@ -407,7 +407,7 @@ impl SimpleComponent for App { }, #[watch] - set_css_classes: match model.state.as_ref() { + set_css_classes: match &model.state { Some(LauncherState::GameOutdated { .. }) | Some(LauncherState::VoiceOutdated(_)) => &["warning"], @@ -427,7 +427,7 @@ impl SimpleComponent for App { }, #[watch] - set_tooltip_text: Some(&match model.state.as_ref() { + set_tooltip_text: Some(&match &model.state { Some(LauncherState::GameOutdated { .. }) | Some(LauncherState::VoiceOutdated(_)) => tr("main-window--version-outdated-tooltip"), @@ -444,9 +444,6 @@ impl SimpleComponent for App { _ => String::new() }), - #[watch] - set_sensitive: !model.disabled_buttons, - set_hexpand: false, set_width_request: 200, @@ -668,7 +665,7 @@ impl SimpleComponent for App { sender.input(AppMsg::SetLoadingStatus(Some(Some(tr("downloading-background-picture"))))); if let Err(err) = crate::background::download_background() { - tracing::error!("Failed to download background picture"); + tracing::error!("Failed to download background picture: {err}"); sender.input(AppMsg::Toast { title: tr("background-downloading-failed"), diff --git a/src/ui/preferences/general.rs b/src/ui/preferences/general.rs index 79b0cce..c44e97c 100644 --- a/src/ui/preferences/general.rs +++ b/src/ui/preferences/general.rs @@ -346,7 +346,7 @@ impl SimpleAsyncComponent for GeneralApp { VersionDiff::NotInstalled { .. } => &[] } - None => &["success"] + None => &[] }, #[watch]