Commit 8efa41d1 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖
Browse files

Remove AppLauncher as singleton for application.

Because app can doesn't restart between activity restarts.
parent 625507e8
...@@ -19,7 +19,6 @@ import ru.terrakok.gitlabclient.model.system.AppSchedulers ...@@ -19,7 +19,6 @@ import ru.terrakok.gitlabclient.model.system.AppSchedulers
import ru.terrakok.gitlabclient.model.system.ResourceManager import ru.terrakok.gitlabclient.model.system.ResourceManager
import ru.terrakok.gitlabclient.model.system.SchedulersProvider import ru.terrakok.gitlabclient.model.system.SchedulersProvider
import ru.terrakok.gitlabclient.model.system.message.SystemMessageNotifier import ru.terrakok.gitlabclient.model.system.message.SystemMessageNotifier
import ru.terrakok.gitlabclient.presentation.AppLauncher
import toothpick.config.Module import toothpick.config.Module
/** /**
...@@ -62,7 +61,5 @@ class AppModule(context: Context) : Module() { ...@@ -62,7 +61,5 @@ class AppModule(context: Context) : Module() {
) )
bind(AppInfoRepository::class.java) bind(AppInfoRepository::class.java)
bind(AppInfoInteractor::class.java) bind(AppInfoInteractor::class.java)
bind(AppLauncher::class.java).singletonInScope()
} }
} }
\ No newline at end of file
...@@ -13,9 +13,9 @@ class AppLauncher @Inject constructor( ...@@ -13,9 +13,9 @@ class AppLauncher @Inject constructor(
private val router: Router private val router: Router
) { ) {
private val isSignedIn = launchInteractor.signInToSession()
fun coldStart() { fun coldStart() {
val isSignedIn = launchInteractor.signInToSession()
val rootScreen = val rootScreen =
if (isSignedIn) Screens.DrawerFlow if (isSignedIn) Screens.DrawerFlow
else Screens.AuthFlow else Screens.AuthFlow
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment