|
@@ -62,19 +62,22 @@ extension Settings {
|
|
|
func hideSettingsModal() {
|
|
func hideSettingsModal() {
|
|
|
hideModal()
|
|
hideModal()
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- func resetLoopDocuments() {
|
|
|
|
|
- guard let localDocuments = try? FileManager.default.url(
|
|
|
|
|
- for: .documentDirectory,
|
|
|
|
|
- in: .userDomainMask,
|
|
|
|
|
- appropriateFor: nil,
|
|
|
|
|
- create: true
|
|
|
|
|
- ) else {
|
|
|
|
|
- preconditionFailure("Could not get a documents directory URL.")
|
|
|
|
|
- }
|
|
|
|
|
- let storageURL = localDocuments.appendingPathComponent("PumpManagerState" + ".plist")
|
|
|
|
|
- try? FileManager.default.removeItem(at: storageURL)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// Commenting this out for now, as not needed and possibly dangerous for users to be able to nuke their pump pairing informations via the debug menu
|
|
|
|
|
+// Leaving it in here, as it may be a handy functionality for further testing or developers.
|
|
|
|
|
+// See https://github.com/nightscout/Trio/pull/277 for more information
|
|
|
|
|
+//
|
|
|
|
|
+// func resetLoopDocuments() {
|
|
|
|
|
+// guard let localDocuments = try? FileManager.default.url(
|
|
|
|
|
+// for: .documentDirectory,
|
|
|
|
|
+// in: .userDomainMask,
|
|
|
|
|
+// appropriateFor: nil,
|
|
|
|
|
+// create: true
|
|
|
|
|
+// ) else {
|
|
|
|
|
+// preconditionFailure("Could not get a documents directory URL.")
|
|
|
|
|
+// }
|
|
|
|
|
+// let storageURL = localDocuments.appendingPathComponent("PumpManagerState" + ".plist")
|
|
|
|
|
+// try? FileManager.default.removeItem(at: storageURL)
|
|
|
|
|
+// }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|