mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
increase allowance for update
This commit is contained in:
@@ -76,8 +76,8 @@ public class BuildInfo {
|
||||
if (getTimestamp() == null)
|
||||
return false;
|
||||
// System.err.println("Update Timestamp: " + updateTimestamp + "\nBuild Timestamp: " + getTimestamp());
|
||||
// if morethan 12 hours the difference, then allow to update.
|
||||
return DateUtil.getElapsedHours(getTimestamp(), updateTimestamp) > 12;
|
||||
// if morethan 23 hours the difference, then allow to update.
|
||||
return DateUtil.getElapsedHours(getTimestamp(), updateTimestamp) > 23;
|
||||
}
|
||||
|
||||
public static String getUserAgent() {
|
||||
|
||||
@@ -97,8 +97,8 @@ public class AssetsDownloader {
|
||||
if (buildTxtFileHandle.exists()) {
|
||||
buildTimeStamp = format.parse(buildTxtFileHandle.readString());
|
||||
buildDate = buildTimeStamp.toString();
|
||||
// if morethan 12 hours the difference, then allow to update..
|
||||
verifyUpdatable = DateUtil.getElapsedHours(buildTimeStamp, snapsTimestamp) > 12;
|
||||
// if morethan 23 hours the difference, then allow to update..
|
||||
verifyUpdatable = DateUtil.getElapsedHours(buildTimeStamp, snapsTimestamp) > 23;
|
||||
} else {
|
||||
//fallback to old version comparison
|
||||
verifyUpdatable = !StringUtils.isEmpty(version) && !versionString.equals(version);
|
||||
|
||||
Reference in New Issue
Block a user