Fix proxy for github update

This commit is contained in:
bao-qian
2016-05-09 23:51:10 +01:00
parent 3f709cc39e
commit 21aa31f963
2 changed files with 7 additions and 3 deletions

View File

@@ -16,10 +16,14 @@ namespace Wox.Core
[Conditional("RELEASE")]
public static async void UpdateApp()
{
var client = new WebClient {Proxy = HttpRequest.WebProxy(HttpProxy.Instance)};
var downloader = new FileDownloader(client);
try
{
// todo 5/9 the return value of UpdateApp() is NULL, fucking useless!
using (var updater= await UpdateManager.GitHubUpdateManager(Infrastructure.Wox.Github))
using (var updater= await UpdateManager.GitHubUpdateManager(Infrastructure.Wox.Github, urlDownloader:downloader))
{
await updater.UpdateApp();
}