OmerFlame / SwiftRant

devRant API library made in Swift.
GNU General Public License v3.0
3 stars 1 forks source link

using VoteState enum everywhere #13

Closed WilhelmOks closed 2 years ago

WilhelmOks commented 2 years ago

These changes were made so that the user of SwiftRant can use the VoteState enum instead of the Int everywhere (just like it was done in RantInFeed).

I've pulled the VoteState enum out of RantInFeed, so that it can be used more generally. All models that had the voteState: Int property, are changed so that they have a voteState: VoteState computed propery and a voteStateRaw: Int stored property. The initializers of the models were adjusted for that change.

This is a breaking change.

OmerFlame commented 2 years ago

This is a good change, this will make the library way more consistent. Approved and merged.