Split init logic, exclude View dependencies from constructor
BlackDizel opened this issue · 0 comments
BlackDizel commented
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())
}