BartoszCichecki / LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
GNU General Public License v3.0
5.53k stars 249 forks source link

Update Check Improvements #1447

Closed Ace-Radom closed 1 month ago

Ace-Radom commented 1 month ago

Closes: #1410.

This PR contains a group of improvements on LLT update check function.

TODO:

The Check Update button do the same thing as auto update check is triggered on startup / window load. It calls the CheckForUpdate function provided by MainWindow class, which is the easiest way.

I also add an error-handling function for checking updates manually. Since this Check Update button would force check updates from remote, it is more likely to reach the API rate limit. I also thought about removing the force check arg, but it doesn't make sense for a manual check trigger. Therefore results will be shown after the manual check, like "no new updates", "reached API rate limit", or `sth was wrong". But these are only for this manual check, normal auto-check won't show these msgs, since it would be a bit annoying.

Regarding to displaying last update check time on settings page, there's sth I cannot handle with when updating the time dynamically. It's also not so important (I think), so I cancaled this feature plan.

Ace-Radom commented 1 month ago

@BartoszCichecki Done, ready for review.