fix(mac): avoid static UserDefaults in InstanceIdentity
This commit is contained in:
@@ -4,9 +4,9 @@ enum InstanceIdentity {
|
|||||||
private static let suiteName = "com.steipete.clawdis.shared"
|
private static let suiteName = "com.steipete.clawdis.shared"
|
||||||
private static let instanceIdKey = "instanceId"
|
private static let instanceIdKey = "instanceId"
|
||||||
|
|
||||||
private static let defaults: UserDefaults = {
|
private static var defaults: UserDefaults {
|
||||||
UserDefaults(suiteName: suiteName) ?? .standard
|
UserDefaults(suiteName: suiteName) ?? .standard
|
||||||
}()
|
}
|
||||||
|
|
||||||
static let instanceId: String = {
|
static let instanceId: String = {
|
||||||
if let existing = defaults.string(forKey: instanceIdKey)?
|
if let existing = defaults.string(forKey: instanceIdKey)?
|
||||||
|
|||||||
Reference in New Issue
Block a user