Skip to content

Show spinner while WallpaperSource is refreshing

Sam Parkinson requested to merge samtoday/damask:sparky-add-loading-states into main

I love this app, just wanted to fix a small issue:

Before: there was no feedback while the wallpaper was refreshing, so it felt like nothing was happening

After: the refresh button changes to a load spinner while a refresh is in progress:

Screencast_from_2023-02-18_19-05-13

How?

  • Change WallpaperSource api. Now each source provides an async refresh method, so application knows when it finishes refreshing.
  • The Application class calls the refresh and keeps an is_refreshing boolean.
  • Add a request_refresh signal for the manual source, which needs to trigger a refresh when the preferences change.

Merge request reports