fixed resume watching

This commit is contained in:
LagradOst 2021-09-25 15:00:59 +02:00
parent 2f7f4a06a7
commit e65ea01dda
2 changed files with 8 additions and 5 deletions

View file

@ -192,14 +192,14 @@ class HomeFragment : Fragment() {
} }
override fun onResume() { override fun onResume() {
backEvent += ::handleBack
super.onResume() super.onResume()
reloadStored()
} }
/*
override fun onStop() { override fun onStop() {
backEvent -= ::handleBack backEvent -= ::handleBack
super.onStop() super.onStop()
} }*/
private fun reloadStored() { private fun reloadStored() {
context?.let { ctx -> context?.let { ctx ->
@ -208,11 +208,11 @@ class HomeFragment : Fragment() {
} }
} }
private fun handleBack(poppedFragment: Boolean) { /*private fun handleBack(poppedFragment: Boolean) {
if (poppedFragment) { if (poppedFragment) {
reloadStored() reloadStored()
} }
} }*/
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)

View file

@ -797,7 +797,10 @@ class ResultFragment : Fragment() {
else -> { else -> {
} }
} }
arguments?.remove("startValue")
arguments?.remove("startAction")
startAction = null startAction = null
startValue = null
} }
observe(viewModel.allEpisodes) { observe(viewModel.allEpisodes) {