Add frontier url check to update check. Make update checks async. #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I borrowed some code from XL's Updates.cs to grab a lease object from kamori, and put it in the UpdateCheck class. If the task doesn't get a valid response in 15s, it will fallback to a hard-coded value. Also changed the timeout for the version check to 15s.
Since we don't want to stall the UI loading, I made async calls to them in the LauncherApp constructor, and set a couple of bool values when they complete. The launcher object also doesn't get created until the frontier url is found. This required some slight tweaking to the NewsPage, and a slightly larger tweak to MainPage, so that login will wait for those checks to complete. If DoVersionCheck is set to false in the launcher.ini, the version check and frontier check will both return default values and be skipped.
Since the update check is now asynchronous, I removed the FLATPAK directives.