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