Leave serialization up to delegate
Ends up calling saveProfiles() multiple times otherwise.
This commit is contained in:
parent
3f5d23a34c
commit
ef03b2b94d
|
@ -342,9 +342,6 @@ class ConnectionService: Codable {
|
|||
activeProfileKey = key
|
||||
}
|
||||
|
||||
// serialize immediately
|
||||
saveProfiles()
|
||||
|
||||
delegate?.connectionService(didAdd: profile)
|
||||
}
|
||||
|
||||
|
@ -381,9 +378,6 @@ class ConnectionService: Codable {
|
|||
activeProfileKey = newKey
|
||||
}
|
||||
|
||||
// serialize immediately
|
||||
saveProfiles()
|
||||
|
||||
delegate = temporaryDelegate
|
||||
delegate?.connectionService(didRename: oldProfile, to: newProfile)
|
||||
|
||||
|
|
Loading…
Reference in New Issue