Last active
December 27, 2023 08:31
-
-
Save itsandreramon/97a8172795440bcfffb70d8eb8ef108a to your computer and use it in GitHub Desktop.
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
@SingleIn(AppScope::class) | |
class UserSessionManager @Inject constructor(private val app: App) { | |
var userComponent: UserComponent? = null | |
private set | |
fun resetSession() { | |
userComponent = null | |
} | |
fun createSession(id: String) { | |
val session = UserSession(id) | |
userComponent = app.appComponent | |
.userComponentFactory() | |
.create(session) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment