Compare commits

..

No commits in common. "96274f69522a8ec746b0e182c9b83e2514a902d9" and "17d21fdc036340f8c737a9065672d9be51d7d884" have entirely different histories.

2 changed files with 6 additions and 20 deletions

View File

@ -20,7 +20,7 @@
### 截图 ### 截图
<details open> <details>
<summary> 主界面 </summary> <summary> 主界面 </summary>
<picture> <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/909ac6ad-0021-47d7-a75c-7fb6505e8c15"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/909ac6ad-0021-47d7-a75c-7fb6505e8c15">
@ -28,7 +28,7 @@
</picture> </picture>
</details> </details>
<details open> <details>
<summary> 管理员信息 </summary> <summary> 管理员信息 </summary>
<picture> <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/840dca69-e67d-4083-88f8-8e67c3e47141"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/840dca69-e67d-4083-88f8-8e67c3e47141">
@ -36,7 +36,7 @@
</picture> </picture>
</details> </details>
<details open> <details>
<summary> 设置 </summary> <summary> 设置 </summary>
<picture> <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/8fc8c489-b9cd-4e34-ad32-4899ccc275e9"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/8fc8c489-b9cd-4e34-ad32-4899ccc275e9">
@ -44,7 +44,7 @@
</picture> </picture>
</details> </details>
<details open> <details>
<summary> 关于 </summary> <summary> 关于 </summary>
<picture> <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/dbef2d66-4ca4-4e89-8292-dbdce3566f93"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/dbef2d66-4ca4-4e89-8292-dbdce3566f93">

View File

@ -65,14 +65,8 @@ public class SetupViewModel extends BaseViewModel {
proxySetup.addListener((_, _, newValue) -> ConfigManager.proxySetup(newValue)); proxySetup.addListener((_, _, newValue) -> ConfigManager.proxySetup(newValue));
proxyTestUrl.addListener((_, _, newValue) -> ConfigManager.proxyTestUrl(newValue)); proxyTestUrl.addListener((_, _, newValue) -> ConfigManager.proxyTestUrl(newValue));
proxyHost.addListener((_, _, newValue) -> ConfigManager.proxyHost(newValue)); proxyHost.addListener((_, _, newValue) -> ConfigManager.proxyHost(newValue));
proxyHost.addListener((_, _, newValue) -> { proxyPort.addListener((_, _, newValue) -> ConfigManager.proxyPort(newValue));
ConfigManager.proxyHost(newValue); language.addListener((_, _, newValue) -> Context.setLanguage(newValue));
setProxy();
});
proxyPort.addListener((_, _, newValue) -> {
ConfigManager.proxyPort(newValue);
setProxy();
});
} }
public ObjectProperty<Theme> themeProperty() { public ObjectProperty<Theme> themeProperty() {
@ -129,14 +123,6 @@ public class SetupViewModel extends BaseViewModel {
}); });
} }
private void setProxy() {
ConfigManager.checkProxy((success, _) -> {
if (!success) return;
HttpUtil.getInstance().proxy(ConfigManager.proxySetup(), ConfigManager.getProxyInfo());
});
}
private static ProxyCheckTask getProxyCheckTask(String checkUrl) { private static ProxyCheckTask getProxyCheckTask(String checkUrl) {
var task = new ProxyCheckTask(checkUrl); var task = new ProxyCheckTask(checkUrl);
task.onListen(new TaskListener(task) { task.onListen(new TaskListener(task) {