increase allowance for update

This commit is contained in:
Anthony Calosa
2024-11-01 08:57:49 +08:00
parent e227fb8237
commit 7f16956942
2 changed files with 4 additions and 4 deletions

View File

@@ -76,8 +76,8 @@ public class BuildInfo {
if (getTimestamp() == null) if (getTimestamp() == null)
return false; return false;
// System.err.println("Update Timestamp: " + updateTimestamp + "\nBuild Timestamp: " + getTimestamp()); // System.err.println("Update Timestamp: " + updateTimestamp + "\nBuild Timestamp: " + getTimestamp());
// if morethan 12 hours the difference, then allow to update. // if morethan 23 hours the difference, then allow to update.
return DateUtil.getElapsedHours(getTimestamp(), updateTimestamp) > 12; return DateUtil.getElapsedHours(getTimestamp(), updateTimestamp) > 23;
} }
public static String getUserAgent() { public static String getUserAgent() {

View File

@@ -97,8 +97,8 @@ public class AssetsDownloader {
if (buildTxtFileHandle.exists()) { if (buildTxtFileHandle.exists()) {
buildTimeStamp = format.parse(buildTxtFileHandle.readString()); buildTimeStamp = format.parse(buildTxtFileHandle.readString());
buildDate = buildTimeStamp.toString(); buildDate = buildTimeStamp.toString();
// if morethan 12 hours the difference, then allow to update.. // if morethan 23 hours the difference, then allow to update..
verifyUpdatable = DateUtil.getElapsedHours(buildTimeStamp, snapsTimestamp) > 12; verifyUpdatable = DateUtil.getElapsedHours(buildTimeStamp, snapsTimestamp) > 23;
} else { } else {
//fallback to old version comparison //fallback to old version comparison
verifyUpdatable = !StringUtils.isEmpty(version) && !versionString.equals(version); verifyUpdatable = !StringUtils.isEmpty(version) && !versionString.equals(version);