diff --git a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/services/NewSiteCreationService.kt b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/services/NewSiteCreationService.kt index 70ebc87acaf0..979dfc17c6d7 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/services/NewSiteCreationService.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/sitecreation/services/NewSiteCreationService.kt @@ -19,7 +19,9 @@ import org.wordpress.android.util.LocaleManager import java.util.HashMap import javax.inject.Inject -class NewSiteCreationService : AutoForeground(NewSiteCreationServiceState(IDLE)), +private val INITIAL_STATE = IDLE + +class NewSiteCreationService : AutoForeground(NewSiteCreationServiceState(INITIAL_STATE)), NewSiteCreationServiceManagerListener { @Inject lateinit var manager: NewSiteCreationServiceManager @@ -98,7 +100,7 @@ class NewSiteCreationService : AutoForeground(NewSi data: NewSiteCreationServiceData ) { val currentState = AutoForeground.getState(NewSiteCreationServiceState::class.java) - if (currentState == null || currentState.step == FAILURE) { + if (currentState == null || currentState.step == INITIAL_STATE || currentState.step == FAILURE) { clearSiteCreationServiceState() val intent = Intent(context, NewSiteCreationService::class.java)