better caching

This commit is contained in:
LarsBrubaker 2020-05-15 16:59:30 -07:00
parent ab4a809885
commit 85f625a6ef
2 changed files with 10 additions and 7 deletions

View file

@ -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;
});
});
}
}
}