show wallpaper only when support, show test on checked

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-10-14 18:50:41 +08:00
parent 5e616dd502
commit 68ef1fc9e0
8 changed files with 75 additions and 21 deletions

View File

@@ -594,7 +594,13 @@ pub fn current_is_wayland() -> bool {
#[inline]
pub fn get_new_version() -> String {
(*SOFTWARE_UPDATE_URL.lock().unwrap().rsplit('/').next().unwrap_or("")).to_string()
(*SOFTWARE_UPDATE_URL
.lock()
.unwrap()
.rsplit('/')
.next()
.unwrap_or(""))
.to_string()
}
#[inline]
@@ -1248,3 +1254,10 @@ pub fn handle_relay_id(id: String) -> String {
id
}
}
pub fn support_remove_wallpaper() -> bool {
#[cfg(any(target_os = "windows", target_os = "linux"))]
return crate::platform::WallPaperRemover::support();
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
return false;
}