Commit 2964dcee authored by stopcovid@lunabee.com's avatar stopcovid@lunabee.com
Browse files

Update to 2.1.8

- Sport attestations are now valid for 3 hours
parent 50e7b4a9
......@@ -44,8 +44,8 @@ android {
applicationId "fr.gouv.android.stopcovid"
minSdkVersion 21
targetSdkVersion 30
versionCode 102
versionName "2.1.7"
versionCode 104
versionName "2.1.8"
testInstrumentationRunner = 'com.lunabeestudio.stopcovid.TestRunner'
......
......@@ -11,7 +11,7 @@ import kotlin.time.milliseconds
@OptIn(ExperimentalTime::class)
fun AttestationMap.isExpired(robertManager: RobertManager): Boolean {
val qrCodeExpired: Duration = when (this[Constants.Attestation.KEY_REASON]?.value) {
Constants.Attestation.VALUE_REASON_SPORT -> 1.hours
Constants.Attestation.VALUE_REASON_SPORT -> 3.hours
else -> robertManager.qrCodeExpiredHours.toDouble().hours
}
val attestationDuration = System.currentTimeMillis().milliseconds - (this[Constants.Attestation.KEY_DATE_TIME]?.value?.toLongOrNull()?.milliseconds
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment