diff options
Diffstat (limited to 'android/src')
4 files changed, 29 insertions, 2 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt index 89424f156d..992945ecef 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt @@ -91,12 +91,26 @@ class NotificationBanner( if (versionInfoCache.isLatest) { hide() } else { - val template = R.string.unsupported_version_description + val title: Int + val statusImage: Int + val template: Int + + if (versionInfoCache.isSupported) { + title = R.string.update_available + template = R.string.update_available_description + statusImage = R.drawable.icon_notification_warning + } else { + title = R.string.unsupported_version + template = R.string.unsupported_version_description + statusImage = R.drawable.icon_notification_error + } + val parameter = versionInfoCache.upgradeVersion val description = context.getString(template, parameter) externalLink = downloadUrl - showError(R.string.unsupported_version, description) + + show(statusImage, title, description) } return true diff --git a/android/src/main/res/drawable/icon_notification_warning.xml b/android/src/main/res/drawable/icon_notification_warning.xml new file mode 100644 index 0000000000..f316b24154 --- /dev/null +++ b/android/src/main/res/drawable/icon_notification_warning.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape + xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="oval" + > + <solid android:color="@color/yellow"/> + <size android:width="10dp" android:height="10dp"/> +</shape> diff --git a/android/src/main/res/values/colors.xml b/android/src/main/res/values/colors.xml index e882682904..44b8896a0a 100644 --- a/android/src/main/res/values/colors.xml +++ b/android/src/main/res/values/colors.xml @@ -17,6 +17,7 @@ <color name="red95">#C6021A</color> <color name="red45">#73021B</color> <color name="red40">#66021B</color> + <color name="yellow">#FFD323</color> <color name="textInputBorder">#234161</color> </resources> diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml index 6ff554519f..d419e4abc3 100644 --- a/android/src/main/res/values/strings.xml +++ b/android/src/main/res/values/strings.xml @@ -75,6 +75,10 @@ <string name="wireguard_error">WireGuard error</string> <string name="too_many_keys">Too many WireGuard keys registered to account</string> <string name="failed_to_generate_key">Failed to generate WireGuard key</string> + <string name="update_available">Update available</string> + <string name="update_available_description"> + Install Mullvad VPN (%1$s) to stay up to date + </string> <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 |
