Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why MovieDetailsAnimator is not injected as a @Singleton? #83

Open
minchaej opened this issue Sep 14, 2019 · 0 comments
Open

Why MovieDetailsAnimator is not injected as a @Singleton? #83

minchaej opened this issue Sep 14, 2019 · 0 comments

Comments

@minchaej
Copy link

minchaej commented Sep 14, 2019

First of all, thank you so much for this awesome repository.

I have a question about dependency injection:
You inject MovieDetailsAnimator
@Inject lateinit var movieDetailsAnimator: MovieDetailsAnimator
at line 60, MovieDetailsFragment.kt.

And MovieDetailsAnimator is constructed through
class MovieDetailsAnimator @Inject constructor()

Wouldn't it be better if MovieDetailsAnimator was constructed with @singleton annotation? Something like:
@Singleton class MovieDetailsAnimator @Inject constructor()
It seems like there is no point on getting a new instance of MovieDetailsAnimator for every fragment.

Thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant