use Infrastructure.Http.Get to download plugins

This commit is contained in:
Jeremy Wu 2020-12-14 08:48:55 +11:00
parent ee0fc1ac47
commit 49b657b84e
2 changed files with 2 additions and 8 deletions

View file

@ -1,4 +1,5 @@
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Http;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.PluginsManager.Models;
@ -44,7 +45,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"),
Context.API.GetTranslation("plugin_pluginsmanager_please_wait"));
Utilities.Download(plugin.UrlDownload, filePath);
Http.Download(plugin.UrlDownload, filePath);
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"),
Context.API.GetTranslation("plugin_pluginsmanager_download_success"));

View file

@ -57,12 +57,5 @@ namespace Flow.Launcher.Plugin.PluginsManager
return string.Empty;
}
internal static void Download(string downloadUrl, string toFilePath)
{
using var wc = new WebClient { Proxy = Http.WebProxy() };
wc.DownloadFile(downloadUrl, toFilePath);
}
}
}