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

Split init logic, exclude View dependencies from constructor #64

Open
BlackDizel opened this issue Feb 26, 2021 · 0 comments
Open

Split init logic, exclude View dependencies from constructor #64

BlackDizel opened this issue Feb 26, 2021 · 0 comments

Comments

@BlackDizel
Copy link

For example, if you want to init Confetti in some util class on presenters layer, maybe you want to wrote something like this:

util class:
fun initParticles() = ConfettiManager(params)
view class like activity, fragment or custom view:
fun showParticles(particles: ConfettiManager){
  particles.animate(view)
}
presenter class:
fun initParticles(){
  view.showParticles(util.initParticles())
}
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