Drop deprecated .disconnectsIfNotMatching (#472)

Unused since trusted networks was converted to on-demand.
This commit is contained in:
Davide De Rosa 2024-01-14 14:20:39 +01:00 committed by GitHub
parent 67ede3ee82
commit d0cd953031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -49,9 +49,6 @@ extension Profile {
public var withOtherNetworks: Set<OtherNetwork> = [] public var withOtherNetworks: Set<OtherNetwork> = []
@available(*, deprecated, message: "Drop field after releasing as optional to the App Store")
public var disconnectsIfNotMatching: Bool? = true
public init() { public init() {
} }
} }

View File

@ -61,12 +61,7 @@ final class CDProfileRepository: ProfileRepository {
existing.forEach(context.delete) existing.forEach(context.delete)
try profiles.forEach { try profiles.forEach {
_ = try ProfileMapper(context).toDTO($0)
// FIXME: on demand, workaround to retain profiles on downgrade (field is required before 2.2.0)
var copy = $0
copy.onDemand.disconnectsIfNotMatching = true
_ = try ProfileMapper(context).toDTO(copy)
} }
try context.save() try context.save()
} catch { } catch {