From 87cc16fa922edaa49f499a0a3d70a060a7eed7fa Mon Sep 17 00:00:00 2001 From: Siobhan Date: Thu, 20 Apr 2023 14:06:17 +0100 Subject: [PATCH 1/3] feat: Emit save event when post is previewed --- WordPress/Classes/ViewRelated/Post/PostEditor+MoreOptions.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WordPress/Classes/ViewRelated/Post/PostEditor+MoreOptions.swift b/WordPress/Classes/ViewRelated/Post/PostEditor+MoreOptions.swift index ed3352f5bdd8..f414d444a80d 100644 --- a/WordPress/Classes/ViewRelated/Post/PostEditor+MoreOptions.swift +++ b/WordPress/Classes/ViewRelated/Post/PostEditor+MoreOptions.swift @@ -76,6 +76,8 @@ extension PostEditor { return } + emitPostSaveEvent() + savePostBeforePreview() { [weak self] previewURLString, error in guard let self = self else { return From 133107a0cb8555b8359c1a61beb4798b00a9f76f Mon Sep 17 00:00:00 2001 From: Siobhan Date: Thu, 20 Apr 2023 14:13:53 +0100 Subject: [PATCH 2/3] feat: Send save event when toggling editor modes --- .../Classes/ViewRelated/Gutenberg/GutenbergViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift index 3a0b1d512882..4e9076a985ee 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift @@ -483,6 +483,7 @@ class GutenbergViewController: UIViewController, PostEditor, FeaturedImageDelega } func toggleEditingMode() { + emitPostSaveEvent() gutenberg.toggleHTMLMode() mode.toggle() editorSession.switch(editor: analyticsEditor) From c653367c6cb89688bd58cf238dc6b3d51bb9857d Mon Sep 17 00:00:00 2001 From: Siobhan Date: Fri, 21 Apr 2023 10:42:02 +0100 Subject: [PATCH 3/3] Revert "feat: Send save event when toggling editor modes" This reverts commit 133107a0cb8555b8359c1a61beb4798b00a9f76f. --- .../Classes/ViewRelated/Gutenberg/GutenbergViewController.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift index 4e9076a985ee..3a0b1d512882 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift @@ -483,7 +483,6 @@ class GutenbergViewController: UIViewController, PostEditor, FeaturedImageDelega } func toggleEditingMode() { - emitPostSaveEvent() gutenberg.toggleHTMLMode() mode.toggle() editorSession.switch(editor: analyticsEditor)