@@ -49,21 +49,21 @@ public final class AddressBook: Object, Codable, Identifiable {
49
49
50
50
public init ( from decoder: any Decoder ) throws {
51
51
let container = try decoder. container ( keyedBy: CodingKeys . self)
52
- let id = try container. decode ( Int . self, forKey: . id)
53
- let uuid = try container. decode ( String . self, forKey: . uuid)
54
- let name = try container. decode ( String . self, forKey: . name)
55
- let isDefault = try container. decode ( Bool . self, forKey: . isDefault)
56
- let groupContact = try container. decode ( List< GroupContact> . self , forKey: . groupContact)
57
- let organization = try container. decode ( String . self, forKey: . organization)
58
- let isDynamicOrganisation = try container. decode ( Bool . self, forKey: . isDynamicOrganisation)
52
+ let _id = try container. decode ( Int . self, forKey: . id)
53
+ let _uuid = try container. decode ( String . self, forKey: . uuid)
54
+ let _name = try container. decode ( String . self, forKey: . name)
55
+ let _isDefault = try container. decode ( Bool . self, forKey: . isDefault)
56
+ let _groupContact = try container. decode ( List< GroupContact> . self , forKey: . groupContact)
57
+ let _organization = try container. decode ( String . self, forKey: . organization)
58
+ let _isDynamicOrganisation = try container. decode ( Bool . self, forKey: . isDynamicOrganisation)
59
59
60
60
super. init ( )
61
61
62
- self . id = id
63
- self . name = isDynamicOrganisation ? organization : name
64
- self . uuid = uuid
65
- self . isDefault = isDefault
66
- self . groupContact = groupContact
62
+ self . id = _id
63
+ self . name = _isDynamicOrganisation ? _organization : _name
64
+ self . uuid = _uuid
65
+ self . isDefault = _isDefault
66
+ self . groupContact = _groupContact
67
67
}
68
68
}
69
69
0 commit comments