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
5 changes: 0 additions & 5 deletions WordPress/Classes/Utility/Editor/EditorFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ class EditorFactory {
return gutenbergVC
}

func switchToAztec(from source: EditorViewController) {
let replacement = AztecPostViewController(post: source.post, replaceEditor: source.replaceEditor, editorSession: source.editorSession)
source.replaceEditor(source, replacement)
}

func switchToGutenberg(from source: EditorViewController) {
let replacement = GutenbergViewController(post: source.post, replaceEditor: source.replaceEditor, editorSession: source.editorSession)
source.replaceEditor(source, replacement)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ extension GutenbergViewController {
}
}

alert.addDefaultActionWithTitle(MoreSheetAlert.classicTitle) { [unowned self] _ in
self.savePostEditsAndSwitchToAztec()
}

let toggleModeTitle: String = {
if mode == .richText {
return MoreSheetAlert.htmlTitle
Expand Down Expand Up @@ -105,10 +101,6 @@ extension GutenbergViewController {

extension GutenbergViewController {
struct MoreSheetAlert {
static let classicTitle = NSLocalizedString(
"Switch to classic editor",
comment: "Switches from Gutenberg mobile to the classic editor"
)
static let htmlTitle = NSLocalizedString("Switch to HTML Mode", comment: "Switches the Editor to HTML Mode")
static let richTitle = NSLocalizedString("Switch to Visual Mode", comment: "Switches the Editor to Rich Text Mode")
static let previewTitle = NSLocalizedString("Preview", comment: "Displays the Post Preview Interface")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class GutenbergViewController: UIViewController, PostEditor {
case publish
case close
case more
case switchToAztec
case switchBlog
case autoSave
}
Expand Down Expand Up @@ -501,12 +500,6 @@ class GutenbergViewController: UIViewController, PostEditor {
@objc func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
return presentationController(forPresented: presented, presenting: presenting)
}

// MARK: - Switch to Aztec

func savePostEditsAndSwitchToAztec() {
requestHTML(for: .switchToAztec)
}
}

// MARK: - Views setup
Expand Down Expand Up @@ -809,9 +802,6 @@ extension GutenbergViewController: GutenbergBridgeDelegate {
cancelEditing()
case .more:
displayMoreSheet()
case .switchToAztec:
editorSession.switch(editor: .classic)
EditorFactory().switchToAztec(from: self)
case .switchBlog:
blogPickerWasPressed()
case .autoSave:
Expand Down