confetti
confetti copied to clipboard
Split init logic, exclude View dependencies from constructor
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())
}