I decided to clean up my backend Vault Code since the item management code was pretty much the same copy pasted thing, so I decided to make all item classes, LoginItem, CardItem, IdentityItem, NoteItem, SSHKeyItem, a derived class from GenericItem. This was pretty difficult tho, because GenericItem returns GenericItem, and LoginItem and all the rest need GenericItem to return their class. I asked @dexrn, and they told me about covariant returns, where basically you can return GenericItem but then override it in LoginItem and return a LoginItem by calling the the GenericItem func and then converting it to LoginItem. I also noticed that the attachment code in the individual Item classes were out of date, so this helped organise them. There isn’t really much so show so Ill just post a scrshot of the build.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.