Commit eec5b37d authored by Viktor De Pasquale's avatar Viktor De Pasquale

Fixed inconsistent animations in hide

parent e1bda4ee
......@@ -24,8 +24,8 @@ abstract class CompatFragment<ViewModel : CompatViewModel, Binding : ViewDataBin
binding.addOnRebindCallback(object : OnRebindCallback<Binding>() {
override fun onPreBind(binding: Binding): Boolean {
(binding.root as? ViewGroup)?.startAnimations()
return super.onPreBind(binding)
this@CompatFragment.onPreBind(binding)
return true
}
})
......@@ -42,6 +42,10 @@ abstract class CompatFragment<ViewModel : CompatViewModel, Binding : ViewDataBin
delegate.onEventExecute(event, this)
}
protected open fun onPreBind(binding: Binding) {
(binding.root as? ViewGroup)?.startAnimations()
}
protected fun ViewEvent.dispatchOnSelf() = delegate.onEventExecute(this, this@CompatFragment)
}
\ No newline at end of file
......@@ -65,6 +65,8 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
return super.onOptionsItemSelected(item)
}
override fun onPreBind(binding: FragmentHideMd2Binding) = Unit
}
object MotionRevealHelper {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment