Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Commit

Permalink
Simplify the onboarding (#3048)
Browse files Browse the repository at this point in the history
  • Loading branch information
st3fan authored Mar 4, 2021
1 parent 1fc4bf5 commit 2a22bb4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 128 deletions.

This file was deleted.

12 changes: 0 additions & 12 deletions app/src/main/java/org/mozilla/tv/firefox/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import mozilla.components.browser.session.Session
import mozilla.components.concept.engine.EngineView
import mozilla.components.support.base.observer.Consumable
import mozilla.components.support.utils.toSafeIntent
import org.mozilla.tv.firefox.channels.ChannelOnboardingActivity
import org.mozilla.tv.firefox.components.locale.LocaleAwareAppCompatActivity
import org.mozilla.tv.firefox.components.locale.LocaleManager
import org.mozilla.tv.firefox.ext.application
Expand All @@ -35,7 +34,6 @@ import org.mozilla.tv.firefox.ext.setupForApp
import org.mozilla.tv.firefox.ext.webRenderComponents
import org.mozilla.tv.firefox.fxa.FxaReceivedTab
import org.mozilla.tv.firefox.onboarding.OnboardingActivity
import org.mozilla.tv.firefox.onboarding.ReceiveTabPreboardingActivity
import org.mozilla.tv.firefox.telemetry.TelemetryIntegration
import org.mozilla.tv.firefox.telemetry.UrlTextInputLocation
import org.mozilla.tv.firefox.utils.BuildConstants
Expand Down Expand Up @@ -177,21 +175,11 @@ class MainActivity : LocaleAwareAppCompatActivity(), OnUrlEnteredListener, Media
if (safeIntent.hasExtra("TURBO_MODE")) return

val settings = Settings.getInstance(this@MainActivity)
val localeManager = LocaleManager.getInstance()

val onboardingIntent = when {
settings.shouldShowTurboModeOnboarding() -> {
Intent(this@MainActivity, OnboardingActivity::class.java)
}
settings.shouldShowTVOnboarding(localeManager, this) -> {
Intent(this@MainActivity, ChannelOnboardingActivity::class.java)
}

// Receive tab must _always_ be the last onboarding shown. This is because it
// can take the user to sign in
settings.shouldShowReceiveTabsPreboarding() -> {
Intent(this@MainActivity, ReceiveTabPreboardingActivity::class.java)
}
else -> null
}

Expand Down

0 comments on commit 2a22bb4

Please sign in to comment.