mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
Fix the issue that Do*Sections has wrong servers
This commit is contained in:
parent
4928a71787
commit
06feaa029a
2 changed files with 16 additions and 0 deletions
|
|
@ -97,6 +97,14 @@ extension DoHSections: View {
|
|||
self.commit()
|
||||
}
|
||||
}
|
||||
.onChange(of: self.server) { server in
|
||||
switch server.configuration {
|
||||
case .dnsOverTLS:
|
||||
preconditionFailure("unreachable")
|
||||
case .dnsOverHTTPS(let configuration):
|
||||
self.configuration = configuration
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
self.commit()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,14 @@ extension DoTSections: View {
|
|||
self.commit()
|
||||
}
|
||||
}
|
||||
.onChange(of: self.server) { server in
|
||||
switch server.configuration {
|
||||
case .dnsOverTLS(let configuration):
|
||||
self.configuration = configuration
|
||||
case .dnsOverHTTPS:
|
||||
preconditionFailure("unreachable")
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
self.commit()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue