From 12fa0d88d3fc2b5e9d543603105cba12a368485e Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 7 Jan 2025 12:17:05 -0500 Subject: [PATCH] feat: Introduce `gutenberg_kit` editor session property Enable analysis of editor sessions utilizing GutenbergKit. --- .../org/wordpress/android/ui/posts/EditPostActivity.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt index 7fd33a2b426c..b76fcf0cc119 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt @@ -479,10 +479,13 @@ class EditPostActivity : AppCompatActivity(), EditorFragmentActivity, EditorImag site: SiteModel, isNewPost: Boolean ) { if (postEditorAnalyticsSession == null) { + val editor = when { + showGutenbergEditor && isGutenbergKitEditor -> PostEditorAnalyticsSession.Editor.GUTENBERG_KIT + showGutenbergEditor -> PostEditorAnalyticsSession.Editor.GUTENBERG + else -> PostEditorAnalyticsSession.Editor.CLASSIC + } postEditorAnalyticsSession = PostEditorAnalyticsSession( - if (showGutenbergEditor) PostEditorAnalyticsSession.Editor.GUTENBERG - else PostEditorAnalyticsSession.Editor.CLASSIC, - post, site, isNewPost, analyticsTrackerWrapper + editor, post, site, isNewPost, analyticsTrackerWrapper ) } }