summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/VersionInfoNotification.kt22
-rw-r--r--android/src/main/res/values/strings.xml2
2 files changed, 16 insertions, 8 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/VersionInfoNotification.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/VersionInfoNotification.kt
index 8c5fe7568e..942a48d792 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/VersionInfoNotification.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/VersionInfoNotification.kt
@@ -29,20 +29,26 @@ class VersionInfoNotification(
private fun updateVersionInfo(isOutdated: Boolean, isSupported: Boolean, upgrade: String?) {
if (isOutdated || !isSupported) {
- val template: Int
+ if (upgrade != null) {
+ val template: Int
- if (isSupported) {
- status = StatusLevel.Warning
- title = updateAvailable
- template = R.string.update_available_description
+ if (isSupported) {
+ status = StatusLevel.Warning
+ title = updateAvailable
+ template = R.string.update_available_description
+ } else {
+ status = StatusLevel.Error
+ title = unsupportedVersion
+ template = R.string.unsupported_version_description
+ }
+
+ message = context.getString(template, upgrade)
} else {
status = StatusLevel.Error
title = unsupportedVersion
- template = R.string.unsupported_version_description
+ message = context.getString(R.string.unsupported_version_without_upgrade)
}
- message = context.getString(template, upgrade)
-
shouldShow = true
} else {
shouldShow = false
diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml
index 28c3da48c3..1f87bdee89 100644
--- a/android/src/main/res/values/strings.xml
+++ b/android/src/main/res/values/strings.xml
@@ -136,6 +136,8 @@
<string name="unsupported_version">Unsupported version</string>
<string name="unsupported_version_description">You are running an unsupported app version.
Please upgrade to %1$s now to ensure your security</string>
+ <string name="unsupported_version_without_upgrade">You are running an unsupported app
+ version.</string>
<string name="account_credit_expires_soon">Account credit expires soon</string>
<string name="select_location">Select location</string>
<string name="select_location_description">While connected, your real location is masked with a