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

Change text for days since installation (EXPOSUREAPP-6574) #2969

Merged
merged 8 commits into from
Apr 29, 2021

Conversation

chiljamgossow
Copy link
Contributor

@chiljamgossow chiljamgossow commented Apr 27, 2021

New text if installation today or yesterday
Changed calculation to account for date changes (not 24h intervals) based on user time zone

device-2021-04-27-082041

@chiljamgossow chiljamgossow added maintainers Tag pull requests created by maintainers text change PRs with text changes. labels Apr 27, 2021
@chiljamgossow chiljamgossow added this to the 2.1.0 milestone Apr 27, 2021
@chiljamgossow chiljamgossow requested review from a team April 27, 2021 05:47
@harambasicluka
Copy link
Contributor

May need to be changes to 2.2.x as we won't get another translation delivery for 2.1.x.

@harambasicluka
Copy link
Contributor

We'll get a translation delivery, but it is too late for this PR. I have overseen it. Need to ship it with 2.2.x.

@harambasicluka harambasicluka modified the milestones: 2.1.0, 2.2.0 Apr 28, 2021
@chiljamgossow chiljamgossow changed the base branch from release/2.1.x to release/2.2.x April 28, 2021 13:07
Copy link
Contributor

@janetback janetback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UA reviewed

Copy link
Contributor

@mtwalli mtwalli left a 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()
Copy link
Contributor

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)
Copy link
Contributor

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 ?

@mtwalli mtwalli self-assigned this Apr 28, 2021
@sonarcloud
Copy link

sonarcloud bot commented Apr 28, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@chiljamgossow chiljamgossow merged commit c9abb9d into release/2.2.x Apr 29, 2021
@chiljamgossow chiljamgossow deleted the feature/6574-today branch April 29, 2021 06:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers text change PRs with text changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants