diff --git a/WordPress/Classes/Services/BloggingPromptsService.swift b/WordPress/Classes/Services/BloggingPromptsService.swift index cb2c6de58572..6ce8e637401e 100644 --- a/WordPress/Classes/Services/BloggingPromptsService.swift +++ b/WordPress/Classes/Services/BloggingPromptsService.swift @@ -86,18 +86,6 @@ struct BloggingPrompt { let answerCount: Int let displayAvatarURLs: [URL] let attribution: String - - static let examplePrompt = BloggingPrompt( - promptID: 239, - text: "Was there a toy or thing you always wanted as a child, during the holidays or on your birthday, but never received? Tell us about it.", - title: "Prompt number 1", - content: "\n

Was there a toy or thing you always wanted as a child, during the holidays or on your birthday, but never received? Tell us about it.

(courtesy of plinky.com)
\n", - date: Date(), - answered: false, - answerCount: 5, - displayAvatarURLs: [], - attribution: "dayone" - ) } extension BloggingPrompt { diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Prompts/DashboardPromptsCardCell.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Prompts/DashboardPromptsCardCell.swift index 14ab21e6d449..985bea16420c 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Prompts/DashboardPromptsCardCell.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Prompts/DashboardPromptsCardCell.swift @@ -390,11 +390,12 @@ private extension DashboardPromptsCardCell { // MARK: Button actions @objc func answerButtonTapped() { - guard let blog = blog else { + guard let blog = blog, + let prompt = prompt else { return } - let editor = EditPostViewController(blog: blog, prompt: .examplePrompt) + let editor = EditPostViewController(blog: blog, prompt: prompt) editor.modalPresentationStyle = .fullScreen editor.entryPoint = .dashboard presenterViewController?.present(editor, animated: true) diff --git a/WordPress/Classes/ViewRelated/System/Floating Create Button/CreateButtonCoordinator.swift b/WordPress/Classes/ViewRelated/System/Floating Create Button/CreateButtonCoordinator.swift index 885a800d9e7e..f0e4f9fa2b28 100644 --- a/WordPress/Classes/ViewRelated/System/Floating Create Button/CreateButtonCoordinator.swift +++ b/WordPress/Classes/ViewRelated/System/Floating Create Button/CreateButtonCoordinator.swift @@ -333,8 +333,7 @@ private extension CreateButtonCoordinator { promptsHeaderView.answerPromptHandler = { [weak self] in self?.viewController?.dismiss(animated: true) { - // TODO: pass prompt to post editor - let editor = EditPostViewController(blog: blog, prompt: .examplePrompt) + let editor = EditPostViewController(blog: blog, prompt: prompt) editor.modalPresentationStyle = .fullScreen editor.entryPoint = .bloggingPromptsActionSheetHeader self?.viewController?.present(editor, animated: true)