Skip to content

Commit cbe6a62

Browse files
authored
Fix missing featured images in Reader (#24137)
* Fix missing featured images in Reader * Update release notes * Install from wpios-edition
1 parent f1896ec commit cbe6a62

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

Modules/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ let package = Package(
4444
.package(url: "https://github.com/wordpress-mobile/MediaEditor-iOS", branch: "task/spm-support"),
4545
.package(url: "https://github.com/wordpress-mobile/NSObject-SafeExpectations", from: "0.0.6"),
4646
.package(url: "https://github.com/wordpress-mobile/NSURL-IDN", branch: "trunk"),
47-
.package(url: "https://github.com/wordpress-mobile/WordPressKit-iOS", branch: "task/add-remote-comment-update-comment"),
47+
.package(url: "https://github.com/wordpress-mobile/WordPressKit-iOS", branch: "wpios-edition"),
4848
.package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"),
4949
// We can't use wordpress-rs branches nor commits here. Only tags work.
5050
.package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20250127"),

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* [**] The comment composer now opens fullscreen, shows previews of the comment you are replying to, supports savings drafts, and clearly communicates the upload state and errors [#24075]
55
* [*] Add depth indicators for comment threads to make them easier to follow [#24117]
66
* [*] Enable dismissing the virtual keyboard in the experimental editor [#23988]
7+
* [*] Fix an issue with some featured images missing in Reader [#24137]
78
* [*] Remove Submit Feedback form from the Me menu [#24020]
89
* [*] Update iconography in Reader to match WordPress design system [#24132]
910
* [*] Fix unselectable group blocks in the experimental editor [https://github.com/wordpress-mobile/GutenbergKit/pull/68]

WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WordPress/Classes/Models/ReaderPost.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ + (instancetype)createOrReplaceFromRemotePost:(RemoteReaderPost *)remotePost
190190
// assign the topic last.
191191
post.topic = topic;
192192

193+
// auto-suggested image, but NOT an explcitly specified featured image
194+
post.pathForDisplayImage = remotePost.autoSuggestedFeaturedImage;
195+
193196
return post;
194197
}
195198

WordPress/Classes/ViewRelated/Reader/Cards/ReaderPostCellViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class ReaderPostCellViewModel {
3939
self.title = post.titleForDisplay() ?? ""
4040
self.details = post.contentPreviewForDisplay() ?? ""
4141
self.isSeen = post.isSeenSupported ? post.isSeen : nil
42-
self.imageURL = post.featuredImageURLForDisplay()
42+
self.imageURL = post.featuredImageURLForDisplay() ?? post.pathForDisplayImage.flatMap(URL.init)
4343

4444
self.toolbar = ReaderPostToolbarViewModel.make(post: post)
4545
if isP2 && post.primaryTag == "afk" {

0 commit comments

Comments
 (0)