You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code from the codelab puzzled me because the private function userJustLoggedIn() was not called from anywhere.
@Singleton
class UserManager @Inject constructor(...) {
//Remove line
var userDataRepository: UserDataRepository? = null
var userComponent: UserComponent? = null
private set
fun isUserLoggedIn() = userComponent != null
fun logout() {
userComponent = null
}
private fun userJustLoggedIn() {
userComponent = userComponentFactory.create()
}
}
After checking the actual code, I realized that the above code was slightly oversimplified. It might be nicer if simplification was implied in the explanation (e.g. use an ellipsis // …).
The text was updated successfully, but these errors were encountered:
The following code from the codelab puzzled me because the private function
userJustLoggedIn()
was not called from anywhere.After checking the actual code, I realized that the above code was slightly oversimplified. It might be nicer if simplification was implied in the explanation (e.g. use an ellipsis
// …
).The text was updated successfully, but these errors were encountered: