summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/CellInput.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/CellInput.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/CellInput.kt
index fe7c3c357d..0d5ede54fb 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/CellInput.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/CellInput.kt
@@ -27,7 +27,9 @@ class CellInput(val input: EditText, val minValue: Int, val maxValue: Int) {
if (value == false) {
val inputValue = this@CellInput.value
- onSubmit?.invoke(inputValue)
+ if (inputValue == null || (inputValue >= minValue && inputValue <= maxValue)) {
+ onSubmit?.invoke(inputValue)
+ }
}
}
}