| MainActivityNavigation.kt |
A helper class that manages fragment-based navigation within [MainActivity].
This class centralizes the logic for creating and switching between different fragments
(e.g., home screen, browser, settings, onboarding) using the [FragmentManager].
By encapsulating navigation, it simplifies management and testing.
@param supportFragmentManager The [FragmentManager] used to perform fragment transactions.
@param onboardingStorage Manages the state and progress of the user onboarding flow.
@param isInPictureInPictureMode A lambda that returns whether the activity is currently in PiP mode.
@param shouldAnimateHome A lambda that determines if the home screen transition should be animated.
@param showStartBrowsingCfr A function to trigger the "start browsing" CFR if applicable.
@param onEraseAction A function to potentially trigger the widget promotion.
|
11349 |
| Navigator.kt |
The [Navigator] observes changes to the [AppState] and triggers navigation
actions based on the current [Screen].
It subscribes to a flow of [AppState], and whenever the [Screen] changes,
it calls the appropriate method on the provided [AppNavigation] implementation
to navigate the user to the new screen.
@param stateFlow A [Flow] that emits the current [AppState].
@param navigation An implementation of [AppNavigation] that handles the actual screen transitions.
@param scope The [CoroutineScope] in which the state observation will run.
|
4317 |
| StoreLink.kt |
Helper for linking the [BrowserStore] to the [AppStore].
This class subscribes to changes in the [BrowserStore] and dispatches corresponding
actions to the [AppStore] to ensure the application state remains synchronized with the
browser state. Specifically, it handles:
- Updating the app state when the selected tab changes.
- Notifying the app state when all private tabs have been closed (NoTabs action).
|
2475 |