Skip to content

Commit cf707c1

Browse files
committed
Integrate ReaderPostHeaderView
1 parent 63d18c8 commit cf707c1

11 files changed

Lines changed: 497 additions & 140 deletions

File tree

Modules/Sources/WordPressKitObjC/RemoteReaderPost.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ - (instancetype)initWithDictionary:(NSDictionary *)dict;
134134
self.sortDate = [self sortDateFromPostDictionary:dict];
135135
self.sortRank = @(self.sortDate.timeIntervalSinceReferenceDate);
136136
self.status = [self stringOrEmptyString:[dict stringForKey:PostRESTKeyStatus]];
137+
self.excerpt = [self stringOrEmptyString:[dict stringForKey:PostRESTKeyExcerpt]];
137138
self.summary = [self postSummaryFromPostDictionary:dict orPostContent:self.content];
138139
self.tags = [self tagsFromPostDictionary:dict];
139140
self.isSharingEnabled = [[dict numberForKey:PostRESTKeySharingEnabled] boolValue];

Modules/Sources/WordPressKitObjC/include/RemoteReaderPost.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
3838
@property (nonatomic, strong, nullable) NSNumber *siteID;
3939
@property (nonatomic, strong, nullable) NSDate *sortDate;
4040
@property (nonatomic, strong, nullable) NSNumber *sortRank;
41+
/// - warning: It may still contain auto-generated excerpts, but they are not automatically trimmed like `summary`.
42+
@property (nonatomic, strong, nullable) NSString *excerpt;
4143
@property (nonatomic, strong, nullable) NSString *summary;
4244
@property (nonatomic, strong, nullable) NSString *tags;
4345
@property (nonatomic) BOOL isLikesEnabled;

0 commit comments

Comments
 (0)