Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Check Improvements #1447

Merged

Conversation

Ace-Radom
Copy link
Contributor

@Ace-Radom Ace-Radom commented Sep 26, 2024

Closes: #1410.

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

TODO:

  • Manual force check update button on settings page
  • Minium update auto-check time span setting
  • Display last update check time on settings page canceled
  • Show error msg when fails to check updates

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 Ace-Radom marked this pull request as ready for review September 30, 2024 16:28
@Ace-Radom
Copy link
Contributor Author

@BartoszCichecki Done, ready for review.

Copy link
Owner

@BartoszCichecki BartoszCichecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚀

@@ -47,6 +47,9 @@ public class ApplicationSettingsStore
public bool SynchronizeBrightnessToAllPowerPlans { get; set; }
public ModifierKey SmartFnLockFlags { get; set; }
public bool ResetBatteryOnSinceTimerOnReboot { get; set; }
public int UpdateCheckMiniumTimeSpanHours { get; set; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bit much. I guess a drop down with some values like hourly, daily, weekly, monthly etc.
It would be also nice to store this as an actual TimeSpan instead of ints.

@BartoszCichecki BartoszCichecki merged commit d2959c5 into BartoszCichecki:master Oct 16, 2024
1 check passed
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.

Group of improvements on LLT update checker
2 participants