From 3ccd66aa742f26d996c86ea91f49625f9ac47ad0 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 4 Mar 2023 19:32:56 +0200 Subject: [PATCH] fix(ui): fixed background picture updating on "update background" switch disabled --- src/ui/main.rs | 2 +- src/ui/preferences/general.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/main.rs b/src/ui/main.rs index 6441d80..934a028 100644 --- a/src/ui/main.rs +++ b/src/ui/main.rs @@ -570,7 +570,7 @@ impl SimpleComponent for App { tracing::info!("Main window initialized"); - let download_picture = model.style == LauncherStyle::Classic; + let download_picture = model.style == LauncherStyle::Classic && !KEEP_BACKGROUND_FILE.exists(); // Initialize some heavy tasks std::thread::spawn(move || { diff --git a/src/ui/preferences/general.rs b/src/ui/preferences/general.rs index c40778a..8611b8a 100644 --- a/src/ui/preferences/general.rs +++ b/src/ui/preferences/general.rs @@ -657,7 +657,7 @@ impl SimpleAsyncComponent for GeneralApp { #[allow(unused_must_use)] GeneralAppMsg::UpdateLauncherStyle(style) => { - if style == LauncherStyle::Classic && !BACKGROUND_FILE.exists() { + if style == LauncherStyle::Classic && !KEEP_BACKGROUND_FILE.exists() { if let Err(err) = crate::background::download_background() { tracing::error!("Failed to download background picture");