feat(wallpaper): add apply_wallpaper workflow and rotation worker
Adds a new apply_wallpaper command and its plumbing across desktop, mobile, and Android. A WorkManager-based rotation worker handles applying wallpapers in the background. Wallpaper state now tracks currentId and imageIds for precise control. - Introduced apply_wallpaper command across desktop, mobile and Android - Added WorkManager-based rotation worker to apply wallpapers in the background - Extended wallpaper state with currentId and imageIds and updated schemas/permissions
This commit is contained in:
@@ -71,6 +71,10 @@ pub(crate) async fn set_interval<R: Runtime>(app: AppHandle<R>, minutes: usize)
|
||||
pub(crate) async fn next_wallpaper<R: Runtime>(app: AppHandle<R>) -> Result<WallpaperState> {
|
||||
app.wallpaper().next_wallpaper()
|
||||
}
|
||||
#[command]
|
||||
pub(crate) async fn apply_wallpaper<R: Runtime>(app: AppHandle<R>, id: String) -> Result<WallpaperState> {
|
||||
app.wallpaper().apply_wallpaper(ApplyWallpaperRequest { id })
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn get_immich_connection<R: Runtime>(app: AppHandle<R>) -> Result<ImmichConnection> {
|
||||
|
||||
Reference in New Issue
Block a user