Closed johnjeremih closed 3 years ago
Sounds like you just need to add the conductor-archlifecycle module, which provides a ControllerLifecycleOwner. On Jun 21, 2021, 10:15 AM -0500, John De la Cruz @.***>, wrote:
I'm trying to use the MVVM architecture, but I cannot get the "viewLifecycleOwner" when using the View model. How can I get viewLifecycleOwner using Controller? viewModel.employee!!.observe(viewLifecycleOwner,{ mAdapter.notifyDataSetChanged() }) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm trying to use the MVVM architecture, but I cannot get the "viewLifecycleOwner" when using the View model. How can I get viewLifecycleOwner using Controller?
viewModel.employee!!.observe(viewLifecycleOwner,{ mAdapter.notifyDataSetChanged() })