better caching
This commit is contained in:
parent
ab4a809885
commit
85f625a6ef
2 changed files with 10 additions and 7 deletions
|
|
@ -66,13 +66,16 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab
|
|||
|
||||
private async void CheckForUpdate()
|
||||
{
|
||||
var httpClient = new HttpClient();
|
||||
var response = await httpClient.GetStringAsync("https://matterhackers.github.io/MatterControl-Docs/ProContent/Upgrade_To_Pro.md");
|
||||
var uri = "https://matterhackers.github.io/MatterControl-Docs/ProContent/Upgrade_To_Pro.md";
|
||||
|
||||
if (!string.IsNullOrEmpty(response))
|
||||
{
|
||||
markdownWidget.Markdown = response;
|
||||
}
|
||||
WebCache.RetrieveText(uri.ToString(),
|
||||
(markDown) =>
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
markdownWidget.Markdown = markDown;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue