Created
September 5, 2020 13:04
-
-
Save zerobranch/debda645f2e31c1ea3b5b3411a407c48 to your computer and use it in GitHub Desktop.
AppLauncher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppLauncher @Inject constructor( | |
private val launchUseCase: LaunchUseCase, | |
private val router: Router | |
) { | |
fun launch() { | |
val rootScreen = | |
if (launchUseCase.hasAccount) Screens.Home | |
else Screens.Auth | |
if (launchUseCase.isFirstLaunch) { | |
router.newRootChain(rootScreen, Screens.PrivacyPolicy) | |
} else { | |
router.newRootScreen(rootScreen) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment