outdated on install edge case
This commit is contained in:
parent
0361ee8589
commit
249121f80d
1 changed files with 6 additions and 0 deletions
|
@ -38,6 +38,12 @@ private val log = LoggerFactory.getLogger(L.CORE)
|
|||
|
||||
|
||||
fun triggerCheckVersion() {
|
||||
|
||||
if(!SP.contains(R.string.key_last_time_this_version_detected)) {
|
||||
// On a new installation, set it as 30 days old in order to warn that there is a new version.
|
||||
SP.putLong(R.string.key_last_time_this_version_detected, System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30))
|
||||
}
|
||||
|
||||
// If we are good, only check once every day.
|
||||
if(System.currentTimeMillis() > SP.getLong(R.string.key_last_time_this_version_detected, 0) + CHECK_EVERY){
|
||||
checkVersion()
|
||||
|
|
Loading…
Reference in a new issue