Add:Haptic feedback device setting off/light/medium/heavy #472

This commit is contained in:
advplyr
2023-01-08 15:32:15 -06:00
parent 89041c4141
commit d59f3ae0b6
25 changed files with 133 additions and 73 deletions
+7 -1
View File
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Override point for customization after application launch.
let configuration = Realm.Configuration(
schemaVersion: 5,
schemaVersion: 6,
migrationBlock: { [weak self] migration, oldSchemaVersion in
if (oldSchemaVersion < 1) {
self?.logger.log("Realm schema version was \(oldSchemaVersion)")
@@ -36,6 +36,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
newObject?["lockOrientation"] = "NONE"
}
}
if (oldSchemaVersion < 6) {
self?.logger.log("Realm schema version was \(oldSchemaVersion)... Adding hapticFeedback setting")
migration.enumerateObjects(ofType: DeviceSettings.className()) { oldObject, newObject in
newObject?["hapticFeedback"] = "LIGHT"
}
}
}
)
Realm.Configuration.defaultConfiguration = configuration