Skip to content
Snippets Groups Projects
Commit e53cdf74 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Prevent video group to be closed by search

When search only returns one result, the activity was closed
parent 96fbe846
No related branches found
No related tags found
1 merge request!1473Prevent video group to be closed by search
Pipeline #248229 passed with stage
in 4 minutes and 42 seconds
...@@ -138,7 +138,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL ...@@ -138,7 +138,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
(it as? PagedList<MediaLibraryItem>)?.let { pagedList -> videoListAdapter.submitList(pagedList) } (it as? PagedList<MediaLibraryItem>)?.let { pagedList -> videoListAdapter.submitList(pagedList) }
updateEmptyView() updateEmptyView()
restoreMultiSelectHelper() restoreMultiSelectHelper()
if (it !is InitialPagedList<*, *> && activity?.isFinishing == false && viewModel.group != null && it.size < 2) requireActivity().finish() if (it !is InitialPagedList<*, *> && activity?.isFinishing == false && viewModel.group != null && it.size < 2 && viewModel.filterQuery.isNullOrEmpty()) requireActivity().finish()
setFabPlayVisibility(true) setFabPlayVisibility(true)
} }
} }
......
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