File tree 1 file changed +4
-10
lines changed
ios/MullvadVPN/View controllers/VPNSettings
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -563,17 +563,13 @@ final class CustomDNSDataSource: UITableViewDiffableDataSource<
563
563
) -> NSDiffableDataSourceSnapshot < Section , Item > {
564
564
var snapshot = snapshot
565
565
566
- if snapshot . itemIdentifiers ( inSection : . contentBlockers ) . isEmpty {
566
+ if viewModel . customDNSPrecondition == . satisfied {
567
567
snapshot. deleteItems ( [ . dnsServerInfo] )
568
568
} else {
569
- if viewModel . customDNSPrecondition == . satisfied {
570
- snapshot. deleteItems ( [ . dnsServerInfo] )
569
+ if snapshot . itemIdentifiers ( inSection : . customDNS ) . contains ( . dnsServerInfo ) {
570
+ snapshot. reloadItems ( [ . dnsServerInfo] )
571
571
} else {
572
- if snapshot. itemIdentifiers ( inSection: . customDNS) . contains ( . dnsServerInfo) {
573
- snapshot. reloadItems ( [ . dnsServerInfo] )
574
- } else {
575
- snapshot. appendItems ( [ . dnsServerInfo] , toSection: . customDNS)
576
- }
572
+ snapshot. appendItems ( [ . dnsServerInfo] , toSection: . customDNS)
577
573
}
578
574
}
579
575
@@ -618,10 +614,8 @@ final class CustomDNSDataSource: UITableViewDiffableDataSource<
618
614
619
615
if headerView. isExpanded {
620
616
snapshot. deleteItems ( Item . contentBlockers)
621
- snapshot. deleteItems ( [ . dnsServerInfo] )
622
617
} else {
623
618
snapshot. appendItems ( Item . contentBlockers, toSection: . contentBlockers)
624
- snapshot. appendItems ( [ . dnsServerInfo] )
625
619
}
626
620
627
621
headerView. isExpanded. toggle ( )
You can’t perform that action at this time.
0 commit comments