ifl0w / RandomWallpaperGnome3

Random Wallpapers for Gnome 3
MIT License
176 stars 40 forks source link

Replace gi-types with girs and small cosmetic changes #183

Closed ifl0w closed 5 months ago

ifl0w commented 6 months ago

The main change in this PR is the replacement of gi-types with the girs type definitions. This is done because gi-types wasn't updated in quite some time and does not include all newer type definitions.

ifl0w commented 6 months ago

@Lucki Do you see any significant issue with the switch to the girs definitions? Can you also give the Reset auto-fetch timer after manual refresh commit a sanity check?

ifl0w commented 6 months ago

Improved the workarounds required for using girs instead of gi-types.

Lucki commented 6 months ago

Do you see any significant issue with the switch to the girs definitions?

No, those I used were from one of the maintainers of GJS and hoped they would be somewhat up-to-date… You might want to follow https://gitlab.gnome.org/GNOME/gjs/-/issues/521 to stay tuned.

Can you also give the Reset auto-fetch timer after manual refresh commit a sanity check?

The name is a bit stupid but _reset() sets the last activation time to date.now(). With your change that's always happening and not only when no last activation was happening - resulting in the if (intervalSurpassed) { check never triggering.

And… maybe I changed a bit too much¹. I don't see how calling _updateAutoFetching(); would do anything meaningful. Reading the comment you want to set the timer-last-trigger to date.now() on manual fetch but that currently shouldn't have any influence. (I think that's what you've tried above with the _reset())

¹Maybe it's personal preference: When setting that I want a new image every 6 hours I expect a new image every 6 hours. Even when I manually refresh an image in between because I don't like it I still expect a new image after the original time frame. Sorry, I think I forgot to explicitly mention this behavior in the big overhauls. If you want I can have another look at it to tune it to your liking.

ifl0w commented 6 months ago

Thanks for the feedback and the reference to the issue!

I just dropped the commit regarding the timer. It is not really important to me, and we can always revisit it later in case someone doesn't like the new behavior.