File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Flow.Launcher.Infrastructure/Http Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 9
9
using System ;
10
10
using System . ComponentModel ;
11
11
using System . Threading ;
12
+ using System . Windows . Interop ;
13
+ using Flow . Launcher . Plugin ;
12
14
13
15
namespace Flow . Launcher . Infrastructure . Http
14
16
{
@@ -18,6 +20,8 @@ public static class Http
18
20
19
21
private static HttpClient client = new HttpClient ( ) ;
20
22
23
+ public static IPublicAPI _api { get ; set ; }
24
+
21
25
static Http ( )
22
26
{
23
27
// need to be added so it would work on a win10 machine
@@ -77,7 +81,9 @@ var userName when string.IsNullOrEmpty(userName) =>
77
81
}
78
82
catch ( UriFormatException e )
79
83
{
80
- Log . Exception ( "Http" , "Unable to parse Uri" , e ) ;
84
+ _api . ShowMsg ( "Please try again" , "Unable to parse Http Proxy" ) ;
85
+ Log . Exception ( "Flow.Launcher.Infrastructure.Http" , "Unable to parse Uri" , e ) ;
86
+
81
87
}
82
88
}
83
89
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
61
61
_settingsVM = new SettingWindowViewModel ( _updater , _portable ) ;
62
62
_settings = _settingsVM . Settings ;
63
63
64
- Http . Proxy = _settings . Proxy ;
65
64
66
65
_alphabet . Initialize ( _settings ) ;
67
66
_stringMatcher = new StringMatcher ( _alphabet ) ;
@@ -74,6 +73,10 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
74
73
await PluginManager . InitializePlugins ( API ) ;
75
74
var window = new MainWindow ( _settings , _mainVM ) ;
76
75
76
+ Http . _api = API ;
77
+ Http . Proxy = _settings . Proxy ;
78
+
79
+
77
80
Log . Info ( $ "|App.OnStartup|Dependencies Info:{ ErrorReporting . DependenciesInfo ( ) } ") ;
78
81
79
82
Current . MainWindow = window ;
You can’t perform that action at this time.
0 commit comments