diff options
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/ui/customdns/CustomDnsAdapter.kt | 6 |
1 files changed, 5 insertions, 1 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 e2d434f7ab..54f379dfeb 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 @@ -35,7 +35,11 @@ class CustomDnsAdapter(val customDns: CustomDns) : Adapter<CustomDnsItemHolder>( private var enabled by observable(false) { _, oldValue, newValue -> if (oldValue != newValue) { - notifyDataSetChanged() + if (newValue == true) { + notifyItemRangeInserted(0, cachedCustomDnsServers.size + 1) + } else { + notifyItemRangeRemoved(0, cachedCustomDnsServers.size + 1) + } } } |
