Revert "Overview model: RequireActivity instead of fragment"

This reverts commit d93cc51819.
This commit is contained in:
jbr7rr 2023-08-08 18:16:25 +02:00
parent 8647db878c
commit 9c34e15076

View file

@ -37,7 +37,7 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewmodel = ViewModelProvider(requireActivity(), viewModelFactory)[MedtrumOverviewViewModel::class.java] viewmodel = ViewModelProvider(this@MedtrumOverviewFragment, viewModelFactory).get(MedtrumOverviewViewModel::class.java)
viewmodel?.apply { viewmodel?.apply {
eventHandler.observe(viewLifecycleOwner) { evt -> eventHandler.observe(viewLifecycleOwner) { evt ->
when (evt.peekContent()) { when (evt.peekContent()) {