mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
commit
43d8e01f67
1 changed files with 2 additions and 5 deletions
|
|
@ -40,11 +40,8 @@ struct ContentView {
|
|||
}
|
||||
|
||||
func removeServers(at indexSet: IndexSet) {
|
||||
if let current = self.selection, indexSet.contains(current) {
|
||||
self.selection = min(
|
||||
current,
|
||||
self.servers.count - 1 - indexSet.count
|
||||
)
|
||||
if let current = self.selection, indexSet.contains(where: { $0 <= current }) {
|
||||
self.selection = nil
|
||||
}
|
||||
if indexSet.map({ self.servers[$0].id.uuidString }).contains(self.usedID) {
|
||||
self.removeSettings()
|
||||
|
|
|
|||
Loading…
Reference in a new issue