summaryrefslogtreecommitdiff
path: root/Juick/Model
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-04-26 18:53:09 +0300
committerGravatar Vitaly Takmazov2023-04-26 18:53:09 +0300
commit9ca85a0132ed9d33dac586e05a048ffcff9b7843 (patch)
tree1a8dab48559fb05c35628247af40d9779beb2715 /Juick/Model
parent0ceb9ab7775d259eacad4be86db160740577c850 (diff)
Display user premium status
Diffstat (limited to 'Juick/Model')
-rw-r--r--Juick/Model/User.h1
-rw-r--r--Juick/Model/User.m1
2 files changed, 2 insertions, 0 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;
}