Fix fragments lifecycleOwner

This commit is contained in:
vvb2060
2021-11-02 05:51:40 +08:00
committed by John Wu
parent 3aa1a68cdc
commit e49d29a914
2 changed files with 3 additions and 3 deletions
@@ -35,7 +35,7 @@ abstract class BaseUIFragment<VM : BaseViewModel, Binding : ViewDataBinding> :
): View? {
binding = DataBindingUtil.inflate<Binding>(inflater, layoutRes, container, false).also {
it.setVariable(BR.viewModel, viewModel)
it.lifecycleOwner = this
it.lifecycleOwner = viewLifecycleOwner
}
return binding.root
}