diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs index e8cf39880..c9b2a6877 100644 --- a/Flow.Launcher.Infrastructure/Http/Http.cs +++ b/Flow.Launcher.Infrastructure/Http/Http.cs @@ -9,6 +9,8 @@ using Flow.Launcher.Infrastructure.UserSettings; using System; using System.ComponentModel; using System.Threading; +using System.Windows.Interop; +using Flow.Launcher.Plugin; namespace Flow.Launcher.Infrastructure.Http { @@ -18,6 +20,8 @@ namespace Flow.Launcher.Infrastructure.Http private static HttpClient client = new HttpClient(); + public static IPublicAPI _api { get; set; } + static Http() { // need to be added so it would work on a win10 machine @@ -77,7 +81,9 @@ namespace Flow.Launcher.Infrastructure.Http } catch(UriFormatException e) { - Log.Exception("Http", "Unable to parse Uri", e); + _api.ShowMsg("Please try again", "Unable to parse Http Proxy"); + Log.Exception("Flow.Launcher.Infrastructure.Http", "Unable to parse Uri", e); + } } diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 7c4c6a367..54ede7ff7 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -61,7 +61,6 @@ namespace Flow.Launcher _settingsVM = new SettingWindowViewModel(_updater, _portable); _settings = _settingsVM.Settings; - Http.Proxy = _settings.Proxy; _alphabet.Initialize(_settings); _stringMatcher = new StringMatcher(_alphabet); @@ -74,6 +73,10 @@ namespace Flow.Launcher await PluginManager.InitializePlugins(API); var window = new MainWindow(_settings, _mainVM); + Http._api = API; + Http.Proxy = _settings.Proxy; + + Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}"); Current.MainWindow = window;