diff options
-rw-r--r-- | Juick/Model/User.h | 1 | ||||
-rw-r--r-- | Juick/Model/User.m | 1 | ||||
-rw-r--r-- | Juick/Views/MessageCell.m | 6 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Juick/Model/User.h b/Juick/Model/User.h index 5393c3d..deea41a 100644 --- a/Juick/Model/User.h +++ b/Juick/Model/User.h @@ -15,6 +15,7 @@ @property (nonatomic, strong) NSString *token; @property (nonatomic, strong) NSString *uri; @property (nonatomic) NSInteger unreadCount; +@property (nonatomic, assign) bool premium; + (User *) fromJSON:(NSDictionary *)jsonData; diff --git a/Juick/Model/User.m b/Juick/Model/User.m index 2401c7e..65f7fe3 100644 --- a/Juick/Model/User.m +++ b/Juick/Model/User.m @@ -18,6 +18,7 @@ user.token = jsonData[@"hash"]; user.uri = jsonData[@"uri"]; user.unreadCount = [jsonData[@"messagesCount"] integerValue]; + user.premium = jsonData[@"premium"]; return user; } diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m index ec2c07b..ceb2ac5 100644 --- a/Juick/Views/MessageCell.m +++ b/Juick/Views/MessageCell.m @@ -92,7 +92,11 @@ const NSString *unreadMarker = @"●"; self.attachmentHeight.constant = 0; self.attach.image = nil; } - self.title.text = msg.user.uname; + if (msg.user.premium) { + self.title.text = [NSString stringWithFormat:@"%@ ☆", msg.user.uname]; + } else { + self.title.text = msg.user.uname; + } self.timestamp.text = [[[AppDelegate shared].sharedDateFormatter dateFromString:msg.timestamp] timeAgo]; NSUInteger count = [msg.repliesCount unsignedIntegerValue]; |