mirror of
https://gitee.com/willfree/minoaClientWindows_gradle.git
synced 2026-10-05 01:15:44 +08:00
修复了注册前API没有实例化的问题(在设置新IP后要求用户重新启动APP);修复了注册后新用户首次登录时反复加载通知的BUG【注册时使用getNews将通知状态全部修改成已阅】
This commit is contained in:
1 parent
4a5435a973
commit
62ed06312b
31 files changed
+509
-303
No files matched your search
@@ -53,9 +53,10 @@ public class SettingOverviewController {
|
||||
// 弹窗参考:https://code.makery.ch/blog/javafx-dialogs-official/
|
||||
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||
alert.setTitle("设置成功");
|
||||
alert.setHeaderText("IP/包前缀已设置成功");
|
||||
alert.setContentText("您已成功设置服务器IP/包前缀");
|
||||
alert.setHeaderText("服务器地址/包前缀修改成功");
|
||||
alert.setContentText("您已成功修改服务器IP/包前缀。\n请重新启动应用以生效新设置!");
|
||||
alert.showAndWait();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +110,7 @@ public class SettingOverviewController {
|
||||
ipAddress.setText(mainApp.minoaServerIpString);
|
||||
portAddress.setText(mainApp.minoaServerPortInteger.toString());
|
||||
packetPrefix.setText(mainApp.globalPrefixString);
|
||||
packetPrefix.setDisable(true);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -202,9 +204,29 @@ public class SettingOverviewController {
|
||||
alert.showAndWait();
|
||||
return false;
|
||||
}
|
||||
//判断是否与原内容一致
|
||||
if(isNotChange()){
|
||||
Alert alert = new Alert(Alert.AlertType.WARNING);
|
||||
alert.setTitle("设置未变");
|
||||
alert.setHeaderText("设置未变");
|
||||
alert.setContentText("请确保新配置信息与旧配置信息是不同的。");
|
||||
alert.showAndWait();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 判断新设置的参数是否与原参数一致
|
||||
public boolean isNotChange(){
|
||||
if(ipAddress.getText().trim().equals(mainApp.minoaServerIpString)&&
|
||||
portAddress.getText().trim().equals(mainApp.minoaServerPortInteger.toString())&&
|
||||
packetPrefix.getText().trim().equals(mainApp.globalPrefixString)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断ip和端口号是否可以连接
|
||||
public static boolean isHostConnectable(String host, int port) {
|
||||
Socket socket = new Socket();
|
||||
|
||||
Reference in new issue
Block a user