Skip to content

Split init logic, exclude View dependencies from constructor #64

@BlackDizel

Description

@BlackDizel

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())
}

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