Call initProxy() manually
This commit is contained in:
@@ -36,7 +36,7 @@ public final class ProxyManager {
|
|||||||
private ProxyManager() {
|
private ProxyManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final ObjectBinding<Proxy> proxyProperty = Bindings.createObjectBinding(
|
private static ObjectBinding<Proxy> proxyProperty = Bindings.createObjectBinding(
|
||||||
() -> {
|
() -> {
|
||||||
String host = CONFIG.getProxyHost();
|
String host = CONFIG.getProxyHost();
|
||||||
Integer port = Lang.toIntOrNull(CONFIG.getProxyPort());
|
Integer port = Lang.toIntOrNull(CONFIG.getProxyPort());
|
||||||
@@ -59,11 +59,7 @@ public final class ProxyManager {
|
|||||||
return proxyProperty;
|
return proxyProperty;
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static void init() {
|
||||||
initProxy();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initProxy() {
|
|
||||||
proxyProperty.addListener(observable -> updateSystemProxy());
|
proxyProperty.addListener(observable -> updateSystemProxy());
|
||||||
|
|
||||||
updateSystemProxy();
|
updateSystemProxy();
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class Settings {
|
|||||||
firstLaunch = CONFIG.isFirstLaunch();
|
firstLaunch = CONFIG.isFirstLaunch();
|
||||||
CONFIG.setFirstLaunch(false);
|
CONFIG.setFirstLaunch(false);
|
||||||
|
|
||||||
ProxyManager.getProxy(); // init ProxyManager
|
ProxyManager.init();
|
||||||
|
|
||||||
for (Iterator<Map<Object, Object>> iterator = CONFIG.getAccounts().iterator(); iterator.hasNext();) {
|
for (Iterator<Map<Object, Object>> iterator = CONFIG.getAccounts().iterator(); iterator.hasNext();) {
|
||||||
Map<Object, Object> settings = iterator.next();
|
Map<Object, Object> settings = iterator.next();
|
||||||
|
|||||||
Reference in New Issue
Block a user