summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-05-26 22:30:23 -0300
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-05-26 22:30:23 -0300
commit25dfa99c3de49419c0739c08ac514467d399b17d (patch)
treeafc37140488e914d27f43e78b0ae566d20df83ad
parent8e11df1fc747465237bce4889244479cd479e4bd (diff)
parent348718a725cac7cb83d370d4fe5b612cd14e630a (diff)
downloadmullvadvpn-25dfa99c3de49419c0739c08ac514467d399b17d.tar.xz
mullvadvpn-25dfa99c3de49419c0739c08ac514467d399b17d.zip
Merge branch 'change-time-left'
-rw-r--r--CHANGELOG.md4
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/RemainingTimeLabel.kt8
2 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ed957ca06..8c7ac2f46b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,10 @@ Line wrap the file at 100 chars. Th
## [Unreleased]
+### Changed
+#### Android
+- Show the remaining account time in the Settings screen in days if it's less than 3 months.
+
### Fixed
#### Android
- Fix crash when that happened sometimes when the app tried to start the daemon service on recent
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/RemainingTimeLabel.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/RemainingTimeLabel.kt
index b80573c5ec..f20f6974fd 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/RemainingTimeLabel.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/RemainingTimeLabel.kt
@@ -37,10 +37,12 @@ class RemainingTimeLabel(val context: Context, val view: View) {
if (remainingTimeInfo.years > 0) {
label.setText(getRemainingText(R.plurals.years_left, remainingTimeInfo.years))
- } else if (remainingTimeInfo.months > 0) {
+ } else if (remainingTimeInfo.months >= 3) {
label.setText(getRemainingText(R.plurals.months_left, remainingTimeInfo.months))
- } else if (remainingTimeInfo.days > 0) {
- label.setText(getRemainingText(R.plurals.days_left, remainingTimeInfo.days))
+ } else if (remainingTimeInfo.months > 0 || remainingTimeInfo.days >= 1) {
+ label.setText(
+ getRemainingText(R.plurals.days_left, remainingTime.standardDays.toInt())
+ )
} else {
label.setText(R.string.less_than_a_day_left)
}