Skip to content

Commit 49b657b

Browse files
committed
use Infrastructure.Http.Get to download plugins
1 parent ee0fc1a commit 49b657b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Flow.Launcher.Infrastructure;
2+
using Flow.Launcher.Infrastructure.Http;
23
using Flow.Launcher.Infrastructure.Logger;
34
using Flow.Launcher.Infrastructure.UserSettings;
45
using Flow.Launcher.Plugin.PluginsManager.Models;
@@ -44,7 +45,7 @@ internal void InstallOrUpdate(UserPlugin plugin)
4445
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"),
4546
Context.API.GetTranslation("plugin_pluginsmanager_please_wait"));
4647

47-
Utilities.Download(plugin.UrlDownload, filePath);
48+
Http.Download(plugin.UrlDownload, filePath);
4849

4950
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"),
5051
Context.API.GetTranslation("plugin_pluginsmanager_download_success"));

Plugins/Flow.Launcher.Plugin.PluginsManager/Utilities.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,5 @@ internal static string GetContainingFolderPathAfterUnzip(string unzippedParentFo
5757

5858
return string.Empty;
5959
}
60-
61-
internal static void Download(string downloadUrl, string toFilePath)
62-
{
63-
using var wc = new WebClient { Proxy = Http.WebProxy() };
64-
65-
wc.DownloadFile(downloadUrl, toFilePath);
66-
}
6760
}
6861
}

0 commit comments

Comments
 (0)