mirror of
https://github.com/ProtonMail/protoncore_ios.git
synced 2026-01-11 19:56:33 +00:00
fix: Fix JSON decoding of the User type
Refs: https://gitlab.protontech.ch/apple/shared/protoncore/-/merge_requests/2317
This commit is contained in:
commit
fba5d74457
3 changed files with 4 additions and 4 deletions
|
|
@ -129,7 +129,7 @@ extension UserInfo: NSCoding {
|
|||
twoFA: aDecoder.decodeInteger(forKey: CoderKey.twoFA),
|
||||
enableFolderColor: aDecoder.decodeInteger(forKey: CoderKey.enableFolderColor),
|
||||
inheritParentFolderColor: aDecoder.decodeInteger(forKey: CoderKey.inheritParentFolderColor),
|
||||
subscribed: .init(rawValue: UInt8(aDecoder.decodeInteger(forKey: CoderKey.subscribed))),
|
||||
subscribed: .init(rawValue: UInt64(aDecoder.decodeInteger(forKey: CoderKey.subscribed))),
|
||||
groupingMode: aDecoder.decodeInteger(forKey: CoderKey.groupingMode),
|
||||
weekStart: aDecoder.decodeInteger(forKey: CoderKey.weekStart),
|
||||
delaySendSeconds: aDecoder.decodeIntegerIfPresent(forKey: CoderKey.delaySendSeconds),
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ extension UserInfo {
|
|||
uKeys.append(Key.init(response: key_res))
|
||||
}
|
||||
}
|
||||
let subscribed = response["Subscribed"] as? UInt8
|
||||
let subscribed = response["Subscribed"] as? UInt64
|
||||
|
||||
self.init(
|
||||
maxSpace: response["MaxSpace"] as? Int64,
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ public struct User: Codable, Equatable, CustomDebugStringConvertible {
|
|||
}
|
||||
|
||||
public struct Subscribed: OptionSet, Codable, Equatable {
|
||||
public let rawValue: UInt8
|
||||
public let rawValue: UInt64
|
||||
|
||||
public init(rawValue: UInt8) {
|
||||
public init(rawValue: UInt64) {
|
||||
self.rawValue = rawValue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue