Skip to content

Commit

Permalink
Fix an issue with posts shown embedded in the notifications popover (#…
Browse files Browse the repository at this point in the history
…23889)

* Fix an issue with posts shown embedded in the notifications popover

* Update release notes
  • Loading branch information
kean authored Dec 13, 2024
1 parent c387e2f commit 1389f54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [*] Add support for restricted posts in Reader [#23853]
* [*] Fix minor appearance issues in the Blaze campaign list [#23891]
* [*] Improve the sidebar animations and layout on some iPad models [#23886]
* [*] Fix an issue with posts shown embedded in the notifications popover on iPad [#23889]

25.5
-----
Expand Down
6 changes: 2 additions & 4 deletions WordPress/Classes/System/Root View/ReaderPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,9 @@ final class ReaderPresenter: NSObject, SplitViewDisplayable {
case .subscriptions:
viewModel.selection = .allSubscriptions
case let .post(postID, siteID, isFeed):
viewModel.selection = nil
show(ReaderDetailViewController.controllerWithPostID(NSNumber(value: postID), siteID: NSNumber(value: siteID), isFeed: isFeed))
push(ReaderDetailViewController.controllerWithPostID(NSNumber(value: postID), siteID: NSNumber(value: siteID), isFeed: isFeed))
case let .postURL(url):
viewModel.selection = nil
show(ReaderDetailViewController.controllerWithPostURL(url))
push(ReaderDetailViewController.controllerWithPostURL(url))
case let .topic(topic):
viewModel.selection = nil
show(ReaderStreamViewController.controllerWithTopic(topic))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,11 +777,17 @@ extension NotificationsViewController {
if let postID = note.metaPostID,
let siteID = note.metaSiteID,
note.kind == .matcher || note.kind == .newPost {
let readerViewController = ReaderDetailViewController.controllerWithPostID(postID, siteID: siteID)
readerViewController.navigationItem.largeTitleDisplayMode = .never
readerViewController.hidesBottomBarWhenPushed = true
readerViewController.coordinator?.notificationID = note.notificationId
displayViewController(readerViewController)

if isSidebarModeEnabled && splitViewController == nil {
presentingViewController?.dismiss(animated: true)
RootViewCoordinator.sharedPresenter.showReader(path: .post(postID: postID.intValue, siteID: siteID.intValue))
} else {
let readerViewController = ReaderDetailViewController.controllerWithPostID(postID, siteID: siteID)
readerViewController.navigationItem.largeTitleDisplayMode = .never
readerViewController.hidesBottomBarWhenPushed = true
readerViewController.coordinator?.notificationID = note.notificationId
displayViewController(readerViewController)
}
return
}

Expand Down

0 comments on commit 1389f54

Please sign in to comment.