This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NotificationDataModel *model = [jsonDictionary isc_objectFromJSONWithClass:[NotificationDataModel class]]; | |
| [self updateNotificationCount:model.toast.notificationNumber]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface NotificationDataModel | |
| @property (nonatomic, strong) NotificationToastModel *toast; | |
| @property (nonatomic) BOOL updateBadge; | |
| @property (nonatomic, strong) NSString *updateBadge; | |
| @property (nonatomic) NSInteger connectionDistance; | |
| @end | |
| @interface NotificationToastModel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "toast": { | |
| notificationNumber: 3, | |
| notificationText: "John Appleseed invited you to connect" | |
| }, | |
| "updateBadge": true, | |
| "memberId": "134241252", | |
| "connectionDistance": 3 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (NSInteger)badgeNumberForNotificationsJson:(NotificationsDataModel *)model { | |
| return model.toast.notificationNumber; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (NSNumber *)badgeNumberForNotificationsJson:(NSDictionary *)json { | |
| return ([[json dictionaryForKey:kToast] numberForKey:kNotificationNumber]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (NSNumber *)badgeNumberForNotificationsJson:(NSDictionary *)json { | |
| return ([[json objectForKey:kToast] objectForKey:kNotificationNumber]); | |
| } |
NewerOlder