This commit is contained in:
2dust 2025-04-06 14:22:47 +08:00
parent ba03118a43
commit 597bd021b8
2 changed files with 3 additions and 4 deletions

View file

@ -31,8 +31,7 @@ object UpdateCheckerManager {
val latestRelease = if (includePreRelease) {
JsonUtil.fromJson(response, Array<GitHubRelease>::class.java)
.filter { it.prerelease }
.maxByOrNull { it.publishedAt }
.firstOrNull()
?: throw IllegalStateException("No pre-release found")
} else {
JsonUtil.fromJson(response, GitHubRelease::class.java)

View file

@ -105,11 +105,11 @@ class AboutActivity : BaseActivity() {
}
}
//If it is the Google Play version, not be displayed within 2 days after update
//If it is the Google Play version, not be displayed within 1 days after update
if (Utils.isGoogleFlavor()) {
val lastUpdateTime = AppManagerUtil.getLastUpdateTime(this)
val currentTime = System.currentTimeMillis()
if ((currentTime - lastUpdateTime) < 2 * 24 * 60 * 60 * 1000L) {
if ((currentTime - lastUpdateTime) < 1 * 24 * 60 * 60 * 1000L) {
binding.layoutCheckUpdate.visibility = View.GONE
}
}