Issue #3: Minor changes to improve check, if settings are actually on.
This commit is contained in:
parent
f7ac3d9aed
commit
799d1d98fc
2 changed files with 6 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ enum BlocklistOption: String, CaseIterable, Identifiable {
|
|||
var settings: NEDNSOverHTTPSSettings {
|
||||
let settings = NEDNSOverHTTPSSettings(servers: [ipv4, ipv6])
|
||||
settings.serverURL = URL(string: "https://\(server)/dns-query")
|
||||
settings.matchDomains = [""]
|
||||
settings.matchDomains = ["", "invalid"]
|
||||
|
||||
return settings
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class ViewModel: NSObject, ObservableObject {
|
|||
return
|
||||
}
|
||||
|
||||
if let settings = manager.dnsSettings {
|
||||
if manager.isEnabled, let settings = manager.dnsSettings {
|
||||
for dnsServer in BlocklistOption.allCases {
|
||||
if settings.servers.contains(dnsServer.ipv4) {
|
||||
await MainActor.run {
|
||||
|
|
@ -109,6 +109,10 @@ class ViewModel: NSObject, ObservableObject {
|
|||
|
||||
delayedToggle(false)
|
||||
}
|
||||
|
||||
if !manager.isEnabled {
|
||||
delayedToggle(false)
|
||||
}
|
||||
}
|
||||
else {
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue