mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1822109 - Refactor OnboardingState into its own file
This commit is contained in:
parent
afe774111e
commit
5103a82d9b
@ -13,6 +13,7 @@ import org.mozilla.fenix.browser.browsingmode.BrowsingMode
|
||||
import org.mozilla.fenix.browser.browsingmode.BrowsingModeManager
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.onboarding.FenixOnboarding
|
||||
import org.mozilla.fenix.onboarding.OnboardingState
|
||||
import org.mozilla.fenix.nimbus.Onboarding as OnboardingConfig
|
||||
|
||||
/**
|
||||
@ -31,17 +32,6 @@ sealed class Mode {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes various onboarding states.
|
||||
*/
|
||||
sealed class OnboardingState {
|
||||
// Signed out, without an option to auto-login using a shared FxA account.
|
||||
object SignedOutNoAutoSignIn : OnboardingState()
|
||||
|
||||
// Signed in.
|
||||
object SignedIn : OnboardingState()
|
||||
}
|
||||
|
||||
class CurrentMode(
|
||||
private val context: Context,
|
||||
private val onboarding: FenixOnboarding,
|
||||
|
@ -20,12 +20,12 @@ import org.mozilla.fenix.ext.shouldShowRecentSyncedTabs
|
||||
import org.mozilla.fenix.ext.shouldShowRecentTabs
|
||||
import org.mozilla.fenix.gleanplumb.Message
|
||||
import org.mozilla.fenix.home.Mode
|
||||
import org.mozilla.fenix.home.OnboardingState
|
||||
import org.mozilla.fenix.home.recentbookmarks.RecentBookmark
|
||||
import org.mozilla.fenix.home.recentvisits.RecentlyVisitedItem
|
||||
import org.mozilla.fenix.nimbus.MessageSurfaceId
|
||||
import org.mozilla.fenix.nimbus.OnboardingPanel
|
||||
import org.mozilla.fenix.onboarding.HomeCFRPresenter
|
||||
import org.mozilla.fenix.onboarding.OnboardingState
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
import org.mozilla.fenix.nimbus.Onboarding as OnboardingConfig
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.onboarding
|
||||
|
||||
/**
|
||||
* Describes various onboarding states.
|
||||
*/
|
||||
sealed class OnboardingState {
|
||||
/**
|
||||
* Signed out, without an option to auto-login using a shared FxA account.
|
||||
*/
|
||||
object SignedOutNoAutoSignIn : OnboardingState()
|
||||
|
||||
/**
|
||||
* Signed in.
|
||||
*/
|
||||
object SignedIn : OnboardingState()
|
||||
}
|
@ -17,6 +17,7 @@ import org.mozilla.fenix.browser.browsingmode.BrowsingMode
|
||||
import org.mozilla.fenix.browser.browsingmode.BrowsingModeManager
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.onboarding.FenixOnboarding
|
||||
import org.mozilla.fenix.onboarding.OnboardingState
|
||||
|
||||
class ModeTest {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user