Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 397902f

Browse files
authored
Fix: App since installation note (EXPOSUREAPP-14863) (#5869)
1 parent 9cc5de3 commit 397902f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Corona-Warn-App/src/main/java/de/rki/coronawarnapp/tracing/states/RiskCalculationCardState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ data class LowRisk(
138138
else -> context.getString(R.string.risk_card_body_days_since_installation).format(daysSinceInstallation)
139139
}
140140

141-
fun appInstalledForOverTwoWeeks(): Boolean = daysSinceInstallation < 14 && lastEncounterAt == null
141+
val isAppInstalledLessThanTwoWeeks: Boolean get() = daysSinceInstallation < 14 && lastEncounterAt == null
142142

143143
fun getRiskContactLast(context: Context): String? {
144144
if (lastEncounterAt == null) return null

Corona-Warn-App/src/main/java/de/rki/coronawarnapp/tracing/ui/details/items/risk/LowRiskBox.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LowRiskBox(
3434
rowContact.setText(getRiskContactBody(context))
3535
rowContactLast.isGone = getRiskContactLast(context) == null
3636
rowContactLast.setText(getRiskContactLast(context) ?: "")
37-
rowDaysSinceInstallation.isGone = appInstalledForOverTwoWeeks()
37+
rowDaysSinceInstallation.isGone = !isAppInstalledLessThanTwoWeeks
3838
rowDaysSinceInstallation.setText(getDaysSinceInstall(context))
3939
rowTimeFetched.setText(getTimeFetched(context))
4040
updateAction.isGone = !showUpdateButton

Corona-Warn-App/src/main/java/de/rki/coronawarnapp/tracing/ui/homecards/LowRiskCard.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class LowRiskCard(
2828
rowContact.setText(getRiskContactBody(context))
2929
rowContactLast.isGone = getRiskContactLast(context) == null
3030
rowContactLast.setText(getRiskContactLast(context) ?: "")
31-
rowDaysSinceInstallation.isGone = appInstalledForOverTwoWeeks()
31+
rowDaysSinceInstallation.isGone = !isAppInstalledLessThanTwoWeeks
3232
rowDaysSinceInstallation.setText(getDaysSinceInstall(context))
3333
rowTimeFetched.setText(getTimeFetched(context))
3434
updateAction.isGone = !showUpdateButton

0 commit comments

Comments
 (0)