Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions WordPress/Classes/Services/BloggingPromptsService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<!-- wp:pullquote -->\n<figure class=\"wp-block-pullquote\"><blockquote><p>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.</p><cite>(courtesy of plinky.com)</cite></blockquote></figure>\n<!-- /wp:pullquote -->",
date: Date(),
answered: false,
answerCount: 5,
displayAvatarURLs: [],
attribution: "dayone"
)
}

extension BloggingPrompt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down