mirror of
https://github.com/lil-org/tokenary.git
synced 2025-01-07 06:00:44 +03:00
Store sessions as dictionary
This commit is contained in:
parent
35a71141b7
commit
a61e0ede2b
@ -6,9 +6,9 @@ struct Defaults {
|
||||
|
||||
private static let userDefaults = UserDefaults.standard
|
||||
|
||||
static var storedSessions: [SessionStorage.Item] {
|
||||
static var storedSessions: [String: SessionStorage.Item] {
|
||||
get {
|
||||
return userDefaults.codableValue(type: [SessionStorage.Item].self, forKey: "storedSessions") ?? []
|
||||
return userDefaults.codableValue(type: [String: SessionStorage.Item].self, forKey: "storedSessions") ?? [:]
|
||||
}
|
||||
set {
|
||||
userDefaults.setCodable(newValue, forKey: "storedSessions")
|
||||
|
Loading…
Reference in New Issue
Block a user