Overview model: RequireActivity instead of fragment
This commit is contained in:
parent
f24c872415
commit
d93cc51819
|
@ -34,7 +34,7 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.apply {
|
||||
viewmodel = ViewModelProvider(this@MedtrumOverviewFragment, viewModelFactory).get(MedtrumOverviewViewModel::class.java)
|
||||
viewmodel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumOverviewViewModel::class.java]
|
||||
viewmodel?.apply {
|
||||
eventHandler.observe(viewLifecycleOwner) { evt ->
|
||||
when (evt.peekContent()) {
|
||||
|
|
Loading…
Reference in a new issue