diff options
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt | 4 |
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) } |
