22#import < CoreData/CoreData.h>
33#import < WordPressData/BasePost.h>
44
5+ NS_ASSUME_NONNULL_BEGIN
6+
57typedef NS_ENUM (NSUInteger , SourceAttributionStyle) {
68 SourceAttributionStyleNone,
79 SourceAttributionStylePost,
@@ -20,19 +22,19 @@ extern NSString * const ReaderPostStoredCommentTextKey;
2022
2123@interface ReaderPost : BasePost
2224
23- @property (nonatomic , strong ) NSString *authorDisplayName;
24- @property (nonatomic , strong ) NSString *authorEmail;
25- @property (nonatomic , strong ) NSString *authorURL;
26- @property (nonatomic , strong ) NSString *siteIconURL;
27- @property (nonatomic , strong ) NSString *blogName;
28- @property (nonatomic , strong ) NSString *blogDescription;
29- @property (nonatomic , strong ) NSString *blogURL;
30- @property (nonatomic , strong ) NSNumber *commentCount;
25+ @property (nonatomic , strong , nullable ) NSString *authorDisplayName;
26+ @property (nonatomic , strong , nullable ) NSString *authorEmail;
27+ @property (nonatomic , strong , nullable ) NSString *authorURL;
28+ @property (nonatomic , strong , nullable ) NSString *siteIconURL;
29+ @property (nonatomic , strong , nullable ) NSString *blogName;
30+ @property (nonatomic , strong , nullable ) NSString *blogDescription;
31+ @property (nonatomic , strong , nullable ) NSString *blogURL;
32+ @property (nonatomic , strong , nullable ) NSNumber *commentCount;
3133@property (nonatomic ) BOOL commentsOpen;
32- @property (nonatomic , strong ) NSString *featuredImage;
33- @property (nonatomic , strong ) NSNumber *feedID;
34- @property (nonatomic , strong ) NSNumber *feedItemID;
35- @property (nonatomic , strong ) NSString *globalID;
34+ @property (nonatomic , strong , nullable ) NSString *featuredImage;
35+ @property (nonatomic , strong , nullable ) NSNumber *feedID;
36+ @property (nonatomic , strong , nullable ) NSNumber *feedItemID;
37+ @property (nonatomic , strong , nullable ) NSString *globalID;
3638@property (nonatomic ) BOOL isBlogAtomic;
3739@property (nonatomic ) BOOL isBlogPrivate;
3840@property (nonatomic ) BOOL isFollowing;
@@ -42,47 +44,47 @@ extern NSString * const ReaderPostStoredCommentTextKey;
4244@property (nonatomic ) BOOL isSavedForLater;
4345@property (nonatomic ) BOOL isSeen;
4446@property (nonatomic ) BOOL isSeenSupported;
45- @property (nonatomic , strong ) NSNumber *organizationID;
46- @property (nonatomic , strong ) NSNumber *likeCount;
47- @property (nonatomic , strong ) NSNumber *score;
48- @property (nonatomic , strong ) NSNumber *siteID;
47+ @property (nonatomic ) NSNumber *organizationID;
48+ @property (nonatomic , strong , nullable ) NSNumber *likeCount;
49+ @property (nonatomic , strong , nullable ) NSNumber *score;
50+ @property (nonatomic , strong , nullable ) NSNumber *siteID;
4951// Normalizes sorting between offset or sortDate depending on the flavor of post.
5052// Note that this can store a negative value.
51- @property (nonatomic , strong ) NSNumber *sortRank;
53+ @property (nonatomic ) NSNumber *sortRank;
5254// Normalizes the date to sort by depending on the flavor of post.
53- @property (nonatomic , strong ) NSDate *sortDate;
54- @property (nonatomic , strong ) NSString *summary;
55- @property (nonatomic , strong ) NSSet *comments;
56- @property (nonatomic , strong ) NSString *tags;
57- @property (nonatomic , strong ) ReaderAbstractTopic *topic;
58- @property (nonatomic , strong ) NSSet <ReaderCard *> *card;
55+ @property (nonatomic , strong , nullable ) NSDate *sortDate;
56+ @property (nonatomic , strong , nullable ) NSString *summary;
57+ @property (nonatomic , strong , nullable ) NSSet *comments;
58+ @property (nonatomic , strong , nullable ) NSString *tags;
59+ @property (nonatomic , strong , nullable ) ReaderAbstractTopic *topic;
60+ @property (nonatomic , strong , nullable ) NSSet <ReaderCard *> *card;
5961@property (nonatomic ) BOOL isLikesEnabled;
6062@property (nonatomic ) BOOL isSharingEnabled;
6163@property (nonatomic ) BOOL isSiteBlocked;
62- @property (nonatomic , strong ) SourcePostAttribution *sourceAttribution;
64+ @property (nonatomic , strong , nullable ) SourcePostAttribution *sourceAttribution;
6365@property (nonatomic ) BOOL isSubscribedComments;
6466@property (nonatomic ) BOOL canSubscribeComments;
6567@property (nonatomic ) BOOL receivesCommentNotifications;
6668
67- @property (nonatomic , strong ) NSString *primaryTag;
68- @property (nonatomic , strong ) NSString *primaryTagSlug;
69+ @property (nonatomic , strong , nullable ) NSString *primaryTag;
70+ @property (nonatomic , strong , nullable ) NSString *primaryTagSlug;
6971@property (nonatomic ) BOOL isExternal;
7072@property (nonatomic ) BOOL isJetpack;
71- @property (nonatomic ) NSNumber *wordCount;
72- @property (nonatomic ) NSNumber *readingTime;
73- @property (nonatomic , strong ) ReaderCrossPostMeta *crossPostMeta;
74- @property (nonatomic , strong ) NSString *railcar;
73+ @property (nonatomic , strong , nullable ) NSNumber *wordCount;
74+ @property (nonatomic , strong , nullable ) NSNumber *readingTime;
75+ @property (nonatomic , strong , nullable ) ReaderCrossPostMeta *crossPostMeta;
76+ @property (nonatomic , strong , nullable ) NSString *railcar;
7577
7678// Used for tracking when a post is rendered (displayed), and bumping the train tracks rendered event.
7779@property (nonatomic ) BOOL rendered;
7880
7981// When true indicates a post should not be deleted/cleaned-up as its currently being used.
8082@property (nonatomic ) BOOL inUse;
8183
82- + (instancetype )createOrReplaceFromRemotePost : (RemoteReaderPost *)remotePost forTopic : (ReaderAbstractTopic *)topic context : (NSManagedObjectContext *) managedObjectContext ;
84+ + (instancetype )createOrReplaceFromRemotePost : (RemoteReaderPost *)remotePost forTopic : (nullable ReaderAbstractTopic *)topic context : (NSManagedObjectContext *) managedObjectContext ;
8385
8486- (BOOL )contentIncludesFeaturedImage ;
85- - (NSDictionary *)railcarDictionary ;
87+ - (nullable NSDictionary *)railcarDictionary ;
8688
8789@end
8890
@@ -95,3 +97,4 @@ extern NSString * const ReaderPostStoredCommentTextKey;
9597
9698@end
9799
100+ NS_ASSUME_NONNULL_END
0 commit comments