diff options
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/EditCustomDnsServerHolder.kt | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/EditCustomDnsServerHolder.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/EditCustomDnsServerHolder.kt index 797cd8a683..5e62f47209 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/EditCustomDnsServerHolder.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/EditCustomDnsServerHolder.kt @@ -2,14 +2,13 @@ package net.mullvad.mullvadvpn.ui.customdns import android.text.Editable import android.text.TextWatcher -import android.view.KeyEvent import android.view.View import android.view.View.OnFocusChangeListener -import android.view.inputmethod.EditorInfo import android.widget.EditText import java.net.InetAddress import kotlin.properties.Delegates.observable import net.mullvad.mullvadvpn.R +import net.mullvad.mullvadvpn.util.setOnEnterOrDoneAction import net.mullvad.talpid.util.addressString class EditCustomDnsServerHolder( @@ -33,13 +32,7 @@ class EditCustomDnsServerHolder( } } - setOnEditorActionListener { _, action, event -> - if (action == EditorInfo.IME_ACTION_DONE || event?.keyCode == KeyEvent.KEYCODE_ENTER) { - saveDnsServer() - } - - false - } + setOnEnterOrDoneAction(::saveDnsServer) } private val watcher: TextWatcher = object : TextWatcher { |
