mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix Proxy
This commit is contained in:
parent
d509b11491
commit
4cd093dbdf
2 changed files with 4 additions and 2 deletions
|
|
@ -34,6 +34,7 @@ namespace Flow.Launcher.Infrastructure.Http
|
||||||
|
|
||||||
client = new HttpClient(socketsHttpHandler, false);
|
client = new HttpClient(socketsHttpHandler, false);
|
||||||
client.DefaultRequestHeaders.Add("User-Agent", UserAgent);
|
client.DefaultRequestHeaders.Add("User-Agent", UserAgent);
|
||||||
|
HttpClient.DefaultProxy = WebProxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HttpProxy proxy;
|
private static HttpProxy proxy;
|
||||||
|
|
@ -45,6 +46,7 @@ namespace Flow.Launcher.Infrastructure.Http
|
||||||
{
|
{
|
||||||
proxy = value;
|
proxy = value;
|
||||||
proxy.PropertyChanged += UpdateProxy;
|
proxy.PropertyChanged += UpdateProxy;
|
||||||
|
UpdateProxy(ProxyProperty.Enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,8 @@ namespace Flow.Launcher
|
||||||
_settingsVM = new SettingWindowViewModel(_updater, _portable);
|
_settingsVM = new SettingWindowViewModel(_updater, _portable);
|
||||||
_settings = _settingsVM.Settings;
|
_settings = _settingsVM.Settings;
|
||||||
|
|
||||||
|
Http.Proxy = _settings.Proxy;
|
||||||
|
|
||||||
_alphabet.Initialize(_settings);
|
_alphabet.Initialize(_settings);
|
||||||
_stringMatcher = new StringMatcher(_alphabet);
|
_stringMatcher = new StringMatcher(_alphabet);
|
||||||
StringMatcher.Instance = _stringMatcher;
|
StringMatcher.Instance = _stringMatcher;
|
||||||
|
|
@ -85,8 +87,6 @@ namespace Flow.Launcher
|
||||||
ThemeManager.Instance.Settings = _settings;
|
ThemeManager.Instance.Settings = _settings;
|
||||||
ThemeManager.Instance.ChangeTheme(_settings.Theme);
|
ThemeManager.Instance.ChangeTheme(_settings.Theme);
|
||||||
|
|
||||||
Http.Proxy = _settings.Proxy;
|
|
||||||
|
|
||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||||
|
|
||||||
RegisterExitEvents();
|
RegisterExitEvents();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue