diff --git a/CHANGELOG.md b/CHANGELOG.md index b514b66..2b233c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.0.2 + +* Fix a bug in RKVotable where `voted` would return an incorrect value. +* Add pagination to subscribed subreddits. +* Change RKLink's `URL` property from an NSString to an NSURL. + +## 1.0.1 + +Fix a couple crashes where RKThing subclasses would be created with nil JSON keys. + ## 1.0.0 Initial release of RedditKit! diff --git a/Classes/Model/RKVotable.m b/Classes/Model/RKVotable.m index f0f5381..c65da8e 100644 --- a/Classes/Model/RKVotable.m +++ b/Classes/Model/RKVotable.m @@ -63,21 +63,21 @@ - (BOOL)downvoted - (BOOL)voted { - return (self.voteStatus == RKVoteStatusNone); + return (self.voteStatus != RKVoteStatusNone); } #pragma mark - MTLModel + (NSValueTransformer *)voteStatusJSONTransformer { - return [MTLValueTransformer transformerWithBlock:^(id forward) { - if (!forward || forward == [NSNull null]) + return [MTLValueTransformer transformerWithBlock:^(id vote) { + if (!vote || vote == [NSNull null]) { return @(RKVoteStatusNone); } else { - BOOL likes = [forward boolValue]; + BOOL likes = [vote boolValue]; return likes ? @(RKVoteStatusUpvoted) : @(RKVoteStatusDownvoted); } }]; diff --git a/Example/Example/Example-Prefix.pch b/Example/Example/Example-Prefix.pch index 8c7ec68..bc7c19d 100644 --- a/Example/Example/Example-Prefix.pch +++ b/Example/Example/Example-Prefix.pch @@ -1,7 +1,7 @@ #import #ifdef __OBJC__ - #import + #import #import #import #endif diff --git a/Example/Example/FrontPageViewController.m b/Example/Example/FrontPageViewController.m index 0df3637..18a72c4 100644 --- a/Example/Example/FrontPageViewController.m +++ b/Example/Example/FrontPageViewController.m @@ -21,7 +21,6 @@ // THE SOFTWARE. #import "FrontPageViewController.h" -#import #import "LinkTableViewCell.h" #import "BrowserViewController.h" #import "AuthenticationManager.h"