-
Notifications
You must be signed in to change notification settings - Fork 496
Change text for days since installation (EXPOSUREAPP-6574) #2969
Conversation
May need to be changes to |
We'll get a translation delivery, but it is too late for this PR. I have overseen it. Need to ship it with |
4e1fa9f
to
be023b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UA reviewed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM , small comments , no blocker for me
|
||
val daysSinceInstallation: Long get() = (System.currentTimeMillis() - installTime).roundUpMsToDays() | ||
val today: LocalDate | ||
get() = Instant.now().toLocalDateUserTz() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe timeStamper.nowUTC
?
when (daysSinceInstallation) { | ||
0 -> context.getString(R.string.risk_card_body_installation_today) | ||
1 -> context.getString(R.string.risk_card_body_installation_yesterday) | ||
else -> context.getString(R.string.risk_card_body_days_since_installation).format(daysSinceInstallation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context.getString(R.string.risk_card_body_days_since_installation,daysSinceInstallation)
could format directly ?
Kudos, SonarCloud Quality Gate passed! |
New text if installation today or yesterday
Changed calculation to account for date changes (not 24h intervals) based on user time zone