|
|
|
@ -544,7 +544,7 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
private void showDownLoadInfo() { |
|
|
|
|
//形如 Build#release-2018.07.31.03.03.52.80
|
|
|
|
|
String buildNO = downloadFileConfig.optString("buildNO"); |
|
|
|
|
Date jarDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1)); |
|
|
|
|
Date jarDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(buildNO, new ParsePosition(buildNO.indexOf("-") + 1)); |
|
|
|
|
String serverVersionNO = downloadFileConfig.optString("versionNO"); |
|
|
|
|
String currentVersionNO = ProductConstants.RELEASE_VERSION; |
|
|
|
|
String[] serverVersionSplitStr = serverVersionNO.split("\\."); |
|
|
|
@ -556,8 +556,8 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
//形如 Build#release-2018.07.31.03.03.52.80
|
|
|
|
|
String currentNO = GeneralUtils.readBuildNO(); |
|
|
|
|
if (!".".equals(StableUtils.getInstallHome())) { |
|
|
|
|
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); |
|
|
|
|
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.DAY) > 0) { |
|
|
|
|
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); |
|
|
|
|
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) { |
|
|
|
|
updateButton.setEnabled(true); |
|
|
|
|
updateLabel.setVisible(true); |
|
|
|
|
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO); |
|
|
|
|