Skip to content
Snippets Groups Projects
Commit 445b9c8b authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix MoreFragment leaks

parent 1718c051
No related branches found
No related tags found
1 merge request!1772Get rid of a lot of memory leaks
......@@ -136,12 +136,12 @@ class MoreFragment : BaseFragment(), IRefreshable, IHistory, IDialogManager,
i.putExtra("fragment", SecondaryActivity.STREAMS)
requireActivity().startActivityForResult(i, SecondaryActivity.ACTIVITY_RESULT_SECONDARY)
}
streamsViewModel.dataset.observe(requireActivity()) {
streamsViewModel.dataset.observe(viewLifecycleOwner) {
streamsAdapter.update(it)
streamsEntry.loading.state = EmptyLoadingState.NONE
}
streamsViewModel.loading.observe(requireActivity()) {
streamsViewModel.loading.observe(viewLifecycleOwner) {
lifecycleScope.launchWhenStarted {
if (it) delay(300L)
(activity as? MainActivity)?.refreshing = it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment