Skip to content

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

Open
@minchaej

Description

@minchaej

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! 👍

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Why MovieDetailsAnimator is not injected as a @Singleton? · Issue #83 · android10/Android-CleanArchitecture-Kotlin