summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-11-11 12:10:16 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-12-10 12:55:06 +0000
commit996d272674a3be99b5b9a289fa88ee26624d010f (patch)
tree98762673f4b79e9f3d375bbd592cba1fb1184d2e /android/src
parentbeee503653d9ea2733f7cdacaa34249dfc8ea28c (diff)
downloadmullvadvpn-996d272674a3be99b5b9a289fa88ee26624d010f.tar.xz
mullvadvpn-996d272674a3be99b5b9a289fa88ee26624d010f.zip
Start adding a server when custom DNS is enabled
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt
index 54f379dfeb..81f304154d 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt
@@ -37,6 +37,10 @@ class CustomDnsAdapter(val customDns: CustomDns) : Adapter<CustomDnsItemHolder>(
if (oldValue != newValue) {
if (newValue == true) {
notifyItemRangeInserted(0, cachedCustomDnsServers.size + 1)
+
+ if (cachedCustomDnsServers.isEmpty()) {
+ editingPosition = 0
+ }
} else {
notifyItemRangeRemoved(0, cachedCustomDnsServers.size + 1)
}