diff --git a/src/ui/first_run/main.rs b/src/ui/first_run/main.rs index 8d28c93..b7851b7 100644 --- a/src/ui/first_run/main.rs +++ b/src/ui/first_run/main.rs @@ -16,6 +16,8 @@ use super::finish::*; pub static mut MAIN_WINDOW: Option = None; +// TODO: add special page for launcher style selection + pub struct FirstRunApp { welcome: AsyncController, tos_warning: AsyncController, diff --git a/src/ui/preferences/general.rs b/src/ui/preferences/general.rs index f5e788d..5603262 100644 --- a/src/ui/preferences/general.rs +++ b/src/ui/preferences/general.rs @@ -532,6 +532,19 @@ impl SimpleAsyncComponent for GeneralApp { #[allow(unused_must_use)] GeneralAppMsg::UpdateLauncherStyle(style) => { + if style == LauncherStyle::Classic && !BACKGROUND_FILE.exists() { + if let Err(err) = crate::background::download_background() { + tracing::error!("Failed to download background picture"); + + sender.input(GeneralAppMsg::Toast { + title: tr("background-downloading-failed"), + description: Some(err.to_string()) + }); + + return; + } + } + if let Ok(mut config) = config::get() { config.launcher.style = style;