Skip to content

Commit 02cbdb8

Browse files
committed
Show Blogging Prompts list when selected from Prompt dashboard card.
1 parent fc15d20 commit 02cbdb8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Prompts/DashboardPromptsCardCell.swift

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ class DashboardPromptsCardCell: UICollectionViewCell, Reusable {
5151
}
5252
}
5353

54-
// Used to present the menu sheet for contextual menu.
55-
// NOTE: Remove this once we drop support for iOS 13.
54+
// Used to present:
55+
// - The menu sheet for contextual menu in iOS13.
56+
// - The Blogging Prompts list when selected from the contextual menu.
5657
private weak var presenterViewController: BlogDashboardViewController? = nil
5758

59+
private var blog: Blog?
60+
5861
private lazy var containerStackView: UIStackView = {
5962
let stackView = UIStackView()
6063
stackView.axis = .vertical
@@ -281,6 +284,7 @@ class DashboardPromptsCardCell: UICollectionViewCell, Reusable {
281284
extension DashboardPromptsCardCell: BlogDashboardCardConfigurable {
282285
func configure(blog: Blog, viewController: BlogDashboardViewController?, apiResponse: BlogDashboardRemoteEntity?) {
283286
self.presenterViewController = viewController
287+
self.blog = blog
284288
refreshStackView()
285289
}
286290
}
@@ -314,7 +318,13 @@ private extension DashboardPromptsCardCell {
314318
// MARK: Context menu actions
315319

316320
func viewMoreMenuTapped() {
317-
// TODO.
321+
guard let blog = blog,
322+
let presenterViewController = presenterViewController else {
323+
DDLogError("Failed showing Blogging Prompts from Dashboard card. Missing blog or controller.")
324+
return
325+
}
326+
327+
BloggingPromptsViewController.show(for: blog, from: presenterViewController)
318328
}
319329

320330
func skipMenuTapped() {

0 commit comments

Comments
 (0)