mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
increase allowance for update
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user