mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: renamed telemetry_id to remote_id when export/import settings (#2955)
This commit is contained in:
@@ -108,7 +108,7 @@ public class Store {
|
||||
public func export(to url: URL) {
|
||||
guard let id = Bundle.main.bundleIdentifier,
|
||||
var dictionary = self.defaults.persistentDomain(forName: id) else { return }
|
||||
dictionary.removeValue(forKey: "telemetry_id")
|
||||
dictionary.removeValue(forKey: "remote_id")
|
||||
dictionary.removeValue(forKey: "access_token")
|
||||
dictionary.removeValue(forKey: "refresh_token")
|
||||
NSDictionary(dictionary: dictionary).write(to: url, atomically: true)
|
||||
@@ -118,7 +118,7 @@ public class Store {
|
||||
guard let id = Bundle.main.bundleIdentifier,
|
||||
let dict = NSDictionary(contentsOf: url) as? [String: Any] else { return }
|
||||
|
||||
let keysToPreserve = ["telemetry_id", "access_token", "refresh_token"]
|
||||
let keysToPreserve = ["remote_id", "access_token", "refresh_token"]
|
||||
var importedDict = dict
|
||||
|
||||
for key in keysToPreserve {
|
||||
|
||||
Reference in New Issue
Block a user