diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 1e8bd80bb8a6..c9f362272838 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -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 ----- diff --git a/WordPress/Classes/System/Root View/ReaderPresenter.swift b/WordPress/Classes/System/Root View/ReaderPresenter.swift index 5aafb1d57644..151bc3deb311 100644 --- a/WordPress/Classes/System/Root View/ReaderPresenter.swift +++ b/WordPress/Classes/System/Root View/ReaderPresenter.swift @@ -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)) diff --git a/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController/NotificationsViewController.swift b/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController/NotificationsViewController.swift index 210c5f54ff52..a2eb3fd09fd4 100644 --- a/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController/NotificationsViewController.swift +++ b/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController/NotificationsViewController.swift @@ -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 }