mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
Fix the issue that settings aren't saved until the toggle status is changed
This commit is contained in:
parent
aae4848ed6
commit
2a6b4dd5dd
1 changed files with 5 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ struct ContentView {
|
|||
)
|
||||
}
|
||||
self.servers.remove(atOffsets: indexSet)
|
||||
self.syncSettings()
|
||||
}
|
||||
|
||||
func moveServers(from src: IndexSet, to dst: Int) {
|
||||
|
|
@ -121,7 +122,10 @@ extension ContentView: View {
|
|||
destination: DetailView(
|
||||
server: .init(
|
||||
get: { server },
|
||||
set: { self.servers[i] = $0 }
|
||||
set: {
|
||||
self.servers[i] = $0
|
||||
self.syncSettings()
|
||||
}
|
||||
),
|
||||
isOn: .init(
|
||||
get: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue