Skip to content

Restore favorites for local wallpapers - #126

Open
jrwhip wants to merge 1 commit into
omacom:mainfrom
jrwhip:local-favorites
Open

Restore favorites for local wallpapers#126
jrwhip wants to merge 1 commit into
omacom:mainfrom
jrwhip:local-favorites

Conversation

@jrwhip

@jrwhip jrwhip commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Local wallpapers can't be favorited since the 4.0.0 rewrite. The Go favorites service still handles type: "local" and FavoritesView still renders them (its empty state even says "Tap the heart on any wallpaper in Wallhaven or Local"), but LocalBrowser never got a heart button.

  • New stores/favorites.svelte.ts: one reactive favorites list; isFavorite() / toggleFavorite() / refreshFavorites(). Lets the Local grid show heart state without an IsFavorite IPC call per card (relevant at 10k+ wallpapers).
  • WallpaperTile gets isFavorited / onfavorite props and renders the same heart as WallpaperCard. The topRight snippet, which only existed for the Favorites remove button, is dropped.
  • LocalBrowser wires the heart (ToggleFavorite(path, "local", {name})).
  • FavoritesView and WallpaperCard read/toggle through the store so all three tabs stay in sync. FavoritesView still refreshes from the backend on mount.

No Go changes.

Testing

  • svelte-check: 0 errors
  • wails dev: hearted a local wallpaper, confirmed it appears in Favorites, removed it from Favorites, confirmed the Local heart cleared; persists across restart

Local favorites were lost in the 4.0.0 rewrite: the Go favorites service
still handles type "local" and FavoritesView still renders them, but
LocalBrowser never exposed a way to add one.

- Add a favorites store so heart state comes from one reactive list
  instead of an IsFavorite IPC call per card
- Give WallpaperTile the same heart button as WallpaperCard; drop the
  topRight snippet that only existed for the Favorites remove button
- Wire the heart in LocalBrowser; FavoritesView and WallpaperCard read
  and toggle through the shared store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant