mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 02:37:37 +01:00
Move extension to its own file
This commit is contained in:
parent
73909005de
commit
183f303065
@ -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 }
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user