diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/BasicFragmentDialog.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/BasicFragmentDialog.kt index 302656276dfc..3ad7805108cf 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/BasicFragmentDialog.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/BasicFragmentDialog.kt @@ -14,9 +14,9 @@ import org.wordpress.android.R */ class BasicFragmentDialog : AppCompatDialogFragment() { private lateinit var mTag: String - private lateinit var mTitle: String private lateinit var mMessage: String private lateinit var mPositiveButtonLabel: String + private var mTitle: String? = null private var mNegativeButtonLabel: String? = null private var mCancelButtonLabel: String? = null private var dismissedByPositiveButton = false @@ -37,7 +37,7 @@ class BasicFragmentDialog : AppCompatDialogFragment() { fun initialize( tag: String, - title: String, + title: String?, message: String, positiveButtonLabel: String, negativeButtonLabel: String? = null, @@ -79,8 +79,7 @@ class BasicFragmentDialog : AppCompatDialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val builder = Builder(ContextThemeWrapper(activity, R.style.Calypso_Dialog_Alert)) - builder.setTitle(mTitle) - .setMessage(mMessage) + builder.setMessage(mMessage) .setPositiveButton(mPositiveButtonLabel) { _, _ -> dismissedByPositiveButton = true val activity = activity @@ -89,6 +88,10 @@ class BasicFragmentDialog : AppCompatDialogFragment() { } }.setCancelable(true) + mTitle?.let { + builder.setTitle(mTitle) + } + mNegativeButtonLabel?.let { builder.setNegativeButton(mNegativeButtonLabel) { _, _ -> dismissedByNegativeButton = true diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationActivity.kt index 6d61dd82bf89..5061af50f959 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationActivity.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationActivity.kt @@ -14,30 +14,33 @@ import org.wordpress.android.WordPress import org.wordpress.android.ui.ActivityLauncher import org.wordpress.android.ui.accounts.HelpActivity.Origin import org.wordpress.android.ui.main.SitePickerActivity +import org.wordpress.android.ui.posts.BasicFragmentDialog.BasicDialogNegativeClickInterface +import org.wordpress.android.ui.posts.BasicFragmentDialog.BasicDialogPositiveClickInterface import org.wordpress.android.ui.sitecreation.NewSiteCreationMainVM.NewSiteCreationScreenTitle.ScreenTitleEmpty import org.wordpress.android.ui.sitecreation.NewSiteCreationMainVM.NewSiteCreationScreenTitle.ScreenTitleGeneral import org.wordpress.android.ui.sitecreation.NewSiteCreationMainVM.NewSiteCreationScreenTitle.ScreenTitleStepCount -import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState -import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteCreationCompleted -import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteNotCreated -import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteNotInLocalDb import org.wordpress.android.ui.sitecreation.SiteCreationStep.DOMAINS import org.wordpress.android.ui.sitecreation.SiteCreationStep.SEGMENTS import org.wordpress.android.ui.sitecreation.SiteCreationStep.SITE_INFO import org.wordpress.android.ui.sitecreation.SiteCreationStep.SITE_PREVIEW import org.wordpress.android.ui.sitecreation.SiteCreationStep.VERTICALS -import org.wordpress.android.ui.sitecreation.previews.NewSiteCreationPreviewFragment -import org.wordpress.android.ui.sitecreation.previews.SitePreviewScreenListener import org.wordpress.android.ui.sitecreation.domains.DomainsScreenListener import org.wordpress.android.ui.sitecreation.domains.NewSiteCreationDomainsFragment import org.wordpress.android.ui.sitecreation.misc.OnHelpClickedListener import org.wordpress.android.ui.sitecreation.misc.OnSkipClickedListener +import org.wordpress.android.ui.sitecreation.previews.NewSiteCreationPreviewFragment +import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState +import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteCreationCompleted +import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteNotCreated +import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteNotInLocalDb +import org.wordpress.android.ui.sitecreation.previews.SitePreviewScreenListener import org.wordpress.android.ui.sitecreation.segments.NewSiteCreationSegmentsFragment import org.wordpress.android.ui.sitecreation.segments.SegmentsScreenListener import org.wordpress.android.ui.sitecreation.siteinfo.NewSiteCreationSiteInfoFragment import org.wordpress.android.ui.sitecreation.siteinfo.SiteInfoScreenListener import org.wordpress.android.ui.sitecreation.verticals.NewSiteCreationVerticalsFragment import org.wordpress.android.ui.sitecreation.verticals.VerticalsScreenListener +import org.wordpress.android.ui.utils.UiHelpers import org.wordpress.android.util.wizard.WizardNavigationTarget import javax.inject.Inject @@ -48,8 +51,11 @@ class NewSiteCreationActivity : AppCompatActivity(), SiteInfoScreenListener, SitePreviewScreenListener, OnSkipClickedListener, - OnHelpClickedListener { + OnHelpClickedListener, + BasicDialogPositiveClickInterface, + BasicDialogNegativeClickInterface { @Inject internal lateinit var viewModelFactory: ViewModelProvider.Factory + @Inject internal lateinit var uiHelpers: UiHelpers private lateinit var mainViewModel: NewSiteCreationMainVM override fun onCreate(savedInstanceState: Bundle?) { @@ -89,6 +95,21 @@ class NewSiteCreationActivity : AppCompatActivity(), finish() } }) + mainViewModel.dialogActionObservable.observe(this, Observer { dialogHolder -> + dialogHolder?.let { + val supportFragmentManager = requireNotNull(supportFragmentManager) { + "FragmentManager can't be null at this point" + } + dialogHolder.show(this, supportFragmentManager, uiHelpers) + } + }) + mainViewModel.exitFlowObservable.observe(this, Observer { + setResult(Activity.RESULT_CANCELED) + finish() + }) + mainViewModel.onBackPressedObservable.observe(this, Observer { + super.onBackPressed() + }) } override fun onSegmentSelected(segmentId: Long) { @@ -103,6 +124,10 @@ class NewSiteCreationActivity : AppCompatActivity(), mainViewModel.onDomainsScreenFinished(domain) } + override fun onSiteCreationCompleted() { + mainViewModel.onSiteCreationCompleted() + } + override fun onSitePreviewScreenDismissed(createSiteState: CreateSiteState) { mainViewModel.onSitePreviewScreenFinished(createSiteState) } @@ -162,6 +187,14 @@ class NewSiteCreationActivity : AppCompatActivity(), fragmentTransaction.commit() } + override fun onPositiveClicked(instanceTag: String) { + mainViewModel.onPositiveDialogButtonClicked(instanceTag) + } + + override fun onNegativeClicked(instanceTag: String) { + mainViewModel.onNegativeDialogButtonClicked(instanceTag) + } + override fun onOptionsItemSelected(item: MenuItem): Boolean { if (item.itemId == android.R.id.home) { onBackPressed() @@ -171,9 +204,6 @@ class NewSiteCreationActivity : AppCompatActivity(), } override fun onBackPressed() { - if (!mainViewModel.shouldSuppressBackPress()) { - mainViewModel.onBackPressed() - super.onBackPressed() - } + mainViewModel.onBackPressed() } } diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVM.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVM.kt index 7046bbe7dbfa..ecb27fc85698 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVM.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVM.kt @@ -14,13 +14,16 @@ import org.wordpress.android.ui.sitecreation.NewSiteCreationMainVM.NewSiteCreati import org.wordpress.android.ui.sitecreation.NewSiteCreationMainVM.NewSiteCreationScreenTitle.ScreenTitleStepCount import org.wordpress.android.ui.sitecreation.misc.NewSiteCreationTracker import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState +import org.wordpress.android.ui.utils.UiString.UiStringRes import org.wordpress.android.util.wizard.WizardManager import org.wordpress.android.util.wizard.WizardNavigationTarget import org.wordpress.android.util.wizard.WizardState import org.wordpress.android.viewmodel.SingleEventObservable import org.wordpress.android.viewmodel.SingleLiveEvent +import org.wordpress.android.viewmodel.helpers.DialogHolder import javax.inject.Inject +const val TAG_WARNING_DIALOG = "back_pressed_warning_dialog" const val KEY_CURRENT_STEP = "key_current_step" const val KEY_SITE_CREATION_STATE = "key_site_creation_state" @@ -41,6 +44,7 @@ class NewSiteCreationMainVM @Inject constructor( private val wizardManager: WizardManager ) : ViewModel() { private var isStarted = false + private var siteCreationCompleted = false private lateinit var siteCreationState: SiteCreationState @@ -52,9 +56,18 @@ class NewSiteCreationMainVM @Inject constructor( ) } + private val _dialogAction = SingleLiveEvent() + val dialogActionObservable: LiveData = _dialogAction + private val _wizardFinishedObservable = SingleLiveEvent() val wizardFinishedObservable: LiveData = _wizardFinishedObservable + private val _exitFlowObservable = SingleLiveEvent() + val exitFlowObservable: LiveData = _exitFlowObservable + + private val _onBackPressedObservable = SingleLiveEvent() + val onBackPressedObservable: LiveData = _onBackPressedObservable + fun start(savedInstanceState: Bundle?) { if (isStarted) return if (savedInstanceState == null) { @@ -82,10 +95,23 @@ class NewSiteCreationMainVM @Inject constructor( wizardManager.showNextStep() } - fun shouldSuppressBackPress(): Boolean = wizardManager.isLastStep() - fun onBackPressed() { - wizardManager.onBackPressed() + return if (wizardManager.isLastStep()) { + if (siteCreationCompleted) { + exitFlow(false) + } else { + _dialogAction.value = DialogHolder( + tag = TAG_WARNING_DIALOG, + title = null, + message = UiStringRes(R.string.new_site_creation_preview_back_pressed_warning), + positiveButton = UiStringRes(R.string.exit), + negativeButton = UiStringRes(R.string.cancel) + ) + } + } else { + wizardManager.onBackPressed() + _onBackPressedObservable.call() + } } fun onVerticalsScreenFinished(verticalId: String) { @@ -124,10 +150,42 @@ class NewSiteCreationMainVM @Inject constructor( } } + fun onSiteCreationCompleted() { + siteCreationCompleted = true + } + + /** + * Exits the flow and tracks an event when the user force-exits the "site creation in progress" before it completes. + */ + private fun exitFlow(forceExit: Boolean) { + if (forceExit) { + tracker.trackFlowExited() + } + _exitFlowObservable.call() + } + fun onSitePreviewScreenFinished(createSiteState: CreateSiteState) { _wizardFinishedObservable.value = createSiteState } + fun onPositiveDialogButtonClicked(instanceTag: String) { + when (instanceTag) { + TAG_WARNING_DIALOG -> { + exitFlow(true) + } + else -> NotImplementedError("Unknown dialog tag: $instanceTag") + } + } + + fun onNegativeDialogButtonClicked(instanceTag: String) { + when (instanceTag) { + TAG_WARNING_DIALOG -> { + // do nothing + } + else -> NotImplementedError("Unknown dialog tag: $instanceTag") + } + } + sealed class NewSiteCreationScreenTitle { data class ScreenTitleStepCount(@StringRes val resId: Int, val stepsCount: Int, val stepPosition: Int) : NewSiteCreationScreenTitle() diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/misc/NewSiteCreationTracker.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/misc/NewSiteCreationTracker.kt index cdfd8927ea8f..51a393def8f3 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/misc/NewSiteCreationTracker.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/misc/NewSiteCreationTracker.kt @@ -97,6 +97,10 @@ class NewSiteCreationTracker @Inject constructor(val tracker: AnalyticsTrackerWr tracker.track(AnalyticsTracker.Stat.ENHANCED_SITE_CREATION_COMPLETED) } + fun trackFlowExited() { + tracker.track(AnalyticsTracker.Stat.ENHANCED_SITE_CREATION_EXITED) + } + fun trackErrorShown(errorContext: String, errorType: NewSiteCreationErrorType, errorDescription: String? = null) { trackErrorShown(errorContext, errorType.toString().toLowerCase(), errorDescription) } diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSiteCreationPreviewFragment.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSiteCreationPreviewFragment.kt index 8c425cc74f89..7d51ba7005af 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSiteCreationPreviewFragment.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSiteCreationPreviewFragment.kt @@ -149,6 +149,9 @@ class NewSiteCreationPreviewFragment : NewSiteCreationBaseFormFragment(), viewModel.onHelpClicked.observe(this, Observer { helpClickedListener.onHelpClicked(HelpActivity.Origin.SITE_CREATION_CREATING) }) + viewModel.onSiteCreationCompleted.observe(this, Observer { + sitePreviewScreenListener.onSiteCreationCompleted() + }) viewModel.onOkButtonClicked.observe(this, Observer { createSiteState -> createSiteState?.let { sitePreviewScreenListener.onSitePreviewScreenDismissed(createSiteState) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSitePreviewViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSitePreviewViewModel.kt index 27c5e41d915c..57cf3855d578 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSitePreviewViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/NewSitePreviewViewModel.kt @@ -87,6 +87,9 @@ class NewSitePreviewViewModel @Inject constructor( private val _onOkButtonClicked = SingleLiveEvent() val onOkButtonClicked: LiveData = _onOkButtonClicked + private val _onSiteCreationCompleted = SingleLiveEvent() + val onSiteCreationCompleted: LiveData = _onSiteCreationCompleted + init { dispatcher.register(fetchWpComSiteUseCase) } @@ -176,6 +179,7 @@ class NewSitePreviewViewModel @Inject constructor( val remoteSiteId = event.payload as Long createSiteState = SiteNotInLocalDb(remoteSiteId) fetchNewlyCreatedSiteModel(remoteSiteId) + _onSiteCreationCompleted.asyncCall() } FAILURE -> { serviceStateForRetry = event.payload as NewSiteCreationServiceState diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/SitePreviewScreenListener.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/SitePreviewScreenListener.kt index 9a91791e66ef..dae0139cef2b 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/SitePreviewScreenListener.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/previews/SitePreviewScreenListener.kt @@ -4,4 +4,5 @@ import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.Cr interface SitePreviewScreenListener { fun onSitePreviewScreenDismissed(createSiteState: CreateSiteState) + fun onSiteCreationCompleted() } diff --git a/WordPress/src/main/java/org/wordpress/android/viewmodel/helpers/DialogHolder.kt b/WordPress/src/main/java/org/wordpress/android/viewmodel/helpers/DialogHolder.kt index 428589b205cf..8e247a1b7d7b 100644 --- a/WordPress/src/main/java/org/wordpress/android/viewmodel/helpers/DialogHolder.kt +++ b/WordPress/src/main/java/org/wordpress/android/viewmodel/helpers/DialogHolder.kt @@ -8,7 +8,7 @@ import org.wordpress.android.ui.utils.UiString class DialogHolder( private val tag: String, - private val title: UiString, + private val title: UiString?, private val message: UiString, private val positiveButton: UiString, private val negativeButton: UiString @@ -17,7 +17,7 @@ class DialogHolder( val dialog = BasicFragmentDialog() dialog.initialize( tag = tag, - title = uiHelpers.getTextOfUiString(context, title), + title = title?.let { uiHelpers.getTextOfUiString(context, title) }, message = uiHelpers.getTextOfUiString(context, message), positiveButtonLabel = uiHelpers.getTextOfUiString(context, positiveButton), negativeButtonLabel = uiHelpers.getTextOfUiString(context, negativeButton), diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index f62bdafdd773..e5e934647380 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -109,6 +109,7 @@ Preview %d Write Post dismiss + exit Not now @@ -2506,4 +2507,5 @@ It seems like you\'re on a slow connection. If you don\'t see your new site in the list, try refreshing. Clear Showing site preview + You may lose your progress. Are you sure you want to exit? diff --git a/WordPress/src/test/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVMTest.kt b/WordPress/src/test/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVMTest.kt index aaf9401547b0..8afb04830623 100644 --- a/WordPress/src/test/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVMTest.kt +++ b/WordPress/src/test/java/org/wordpress/android/ui/sitecreation/NewSiteCreationMainVMTest.kt @@ -4,9 +4,11 @@ import android.arch.core.executor.testing.InstantTaskExecutorRule import android.arch.lifecycle.Observer import android.os.Bundle import com.nhaarman.mockitokotlin2.any +import com.nhaarman.mockitokotlin2.anyOrNull import com.nhaarman.mockitokotlin2.argThat import com.nhaarman.mockitokotlin2.clearInvocations import com.nhaarman.mockitokotlin2.verify +import com.nhaarman.mockitokotlin2.verifyNoMoreInteractions import com.nhaarman.mockitokotlin2.whenever import org.assertj.core.api.Assertions.assertThat import org.junit.Before @@ -24,6 +26,7 @@ import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.Cr import org.wordpress.android.ui.sitecreation.previews.NewSitePreviewViewModel.CreateSiteState.SiteCreationCompleted import org.wordpress.android.util.wizard.WizardManager import org.wordpress.android.viewmodel.SingleLiveEvent +import org.wordpress.android.viewmodel.helpers.DialogHolder private const val LOCAL_SITE_ID = 1 private const val SEGMENT_ID = 1L @@ -43,6 +46,9 @@ class NewSiteCreationMainVMTest { @Mock lateinit var tracker: NewSiteCreationTracker @Mock lateinit var navigationTargetObserver: Observer @Mock lateinit var wizardFinishedObserver: Observer + @Mock lateinit var wizardExitedObserver: Observer + @Mock lateinit var dialogActionsObserver: Observer + @Mock lateinit var onBackPressedObserver: Observer @Mock lateinit var savedInstanceState: Bundle @Mock lateinit var wizardManager: WizardManager @Mock lateinit var siteCreationStep: SiteCreationStep @@ -61,6 +67,9 @@ class NewSiteCreationMainVMTest { viewModel.start(null) viewModel.navigationTargetObservable.observeForever(navigationTargetObserver) viewModel.wizardFinishedObservable.observeForever(wizardFinishedObserver) + viewModel.dialogActionObservable.observeForever(dialogActionsObserver) + viewModel.exitFlowObservable.observeForever(wizardExitedObserver) + viewModel.onBackPressedObservable.observeForever(onBackPressedObserver) whenever(wizardManager.stepsCount).thenReturn(STEP_COUNT) // clear invocations since viewModel.start() calls wizardManager.showNextStep clearInvocations(wizardManager) @@ -144,13 +153,36 @@ class NewSiteCreationMainVMTest { @Test fun backNotSuppressedWhenNotLastStep() { whenever(wizardManager.isLastStep()).thenReturn(false) - assertThat(viewModel.shouldSuppressBackPress()).isFalse() + viewModel.onBackPressed() + verify(onBackPressedObserver).onChanged(anyOrNull()) + } + + @Test + fun backSuppressedWhenLastStep() { + whenever(wizardManager.isLastStep()).thenReturn(true) + viewModel.onBackPressed() + verifyNoMoreInteractions(onBackPressedObserver) } @Test - fun backSuppressedForLastStep() { + fun dialogShownOnBackPressedWhenLastStepAndSiteCreationNotCompleted() { whenever(wizardManager.isLastStep()).thenReturn(true) - assertThat(viewModel.shouldSuppressBackPress()).isTrue() + viewModel.onBackPressed() + verify(dialogActionsObserver).onChanged(any()) + } + + @Test + fun flowExitedOnBackPressedWhenLastStepAndSiteCreationCompleted() { + whenever(wizardManager.isLastStep()).thenReturn(true) + viewModel.onSiteCreationCompleted() + viewModel.onBackPressed() + verify(wizardExitedObserver).onChanged(anyOrNull()) + } + + @Test + fun flowExitedOnDialogPositiveButtonClicked() { + viewModel.onPositiveDialogButtonClicked(TAG_WARNING_DIALOG) + verify(wizardExitedObserver).onChanged(anyOrNull()) } @Test diff --git a/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java b/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java index 1b9c323172cc..8674822bb93f 100644 --- a/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java +++ b/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java @@ -382,6 +382,7 @@ public enum Stat { ENHANCED_SITE_CREATION_SUCCESS_PREVIEW_VIEWED, ENHANCED_SITE_CREATION_SUCCESS_PREVIEW_LOADED, ENHANCED_SITE_CREATION_COMPLETED, + ENHANCED_SITE_CREATION_EXITED, ENHANCED_SITE_CREATION_ERROR_SHOWN, ENHANCED_SITE_CREATION_BACKGROUND_SERVICE_UPDATED, MEDIA_LIBRARY_ADDED_PHOTO, diff --git a/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java b/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java index 70f8e9d85ff5..ebf761fa04a3 100644 --- a/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java +++ b/libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java @@ -1215,6 +1215,8 @@ public static String getEventNameForStat(AnalyticsTracker.Stat stat) { return "enhanced_site_creation_success_preview_loaded"; case ENHANCED_SITE_CREATION_COMPLETED: return "enhanced_site_creation_completed"; + case ENHANCED_SITE_CREATION_EXITED: + return "enhanced_site_creation_exited"; case ENHANCED_SITE_CREATION_ERROR_SHOWN: return "enhanced_site_creation_error_shown"; case PERSON_REMOVED: