Move extension to its own file

This commit is contained in:
Nathan Mattes 2023-06-13 12:36:48 +02:00
parent 73909005de
commit 183f303065
2 changed files with 20 additions and 10 deletions

View File

@ -124,13 +124,3 @@ private extension AuthenticationServiceProvider {
}
}
}
private extension UserDefaults {
@objc dynamic var didMigrateAuthentications: Bool {
get {
register(defaults: [#function: false])
return bool(forKey: #function)
}
set { self[#function] = newValue }
}
}

View File

@ -0,0 +1,20 @@
// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import Foundation
public extension UserDefaults {
enum Keys {
static let didMigrateAuthenticationsKey = "didMigrateAuthentications"
}
@objc dynamic var didMigrateAuthentications: Bool {
get {
return bool(forKey: Keys.didMigrateAuthenticationsKey)
}
set {
set(newValue, forKey: Keys.didMigrateAuthenticationsKey)
}
}
}