mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-04-02 15:03:27 +03:00
fix(ui): fixed background picture updating on "update background" switch disabled
This commit is contained in:
parent
714c4758d0
commit
3ccd66aa74
2 changed files with 2 additions and 2 deletions
|
@ -570,7 +570,7 @@ impl SimpleComponent for App {
|
||||||
|
|
||||||
tracing::info!("Main window initialized");
|
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
|
// Initialize some heavy tasks
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
|
|
|
@ -657,7 +657,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
||||||
|
|
||||||
#[allow(unused_must_use)]
|
#[allow(unused_must_use)]
|
||||||
GeneralAppMsg::UpdateLauncherStyle(style) => {
|
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() {
|
if let Err(err) = crate::background::download_background() {
|
||||||
tracing::error!("Failed to download background picture");
|
tracing::error!("Failed to download background picture");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue