Add ability to reset config

This commit is contained in:
Neil Alexander 2024-06-23 17:23:11 +01:00
parent 00419e6269
commit b0c3d045a3
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 37 additions and 43 deletions

View file

@ -90,6 +90,15 @@ class ConfigurationProxy: PlatformItemSource {
}
}
public func reset() {
self.json = MobileGenerateConfigJSON()
try? self.convertToDict()
self.fix()
if var manager = self.manager {
try? self.save(to: &manager)
}
}
public var multicastBeacons: Bool {
get {
let multicastInterfaces = self.get("MulticastInterfaces") as? [[String: Any]] ?? []