[Android] Prevent video group to be closed by search
Nicolas Pomepuy
git at videolan.org
Wed Aug 3 09:48:39 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Aug 2 15:17:57 2022 +0200| [e53cdf74e9db65a82c6c0f201416784ad16afc7e] | committer: Duncan McNamara
Prevent video group to be closed by search
When search only returns one result, the activity was closed
> https://code.videolan.org/videolan/vlc-android/commit/e53cdf74e9db65a82c6c0f201416784ad16afc7e
---
.../vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
index 7973a58c3..42ff3376b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -138,7 +138,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
(it as? PagedList<MediaLibraryItem>)?.let { pagedList -> videoListAdapter.submitList(pagedList) }
updateEmptyView()
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)
}
}
More information about the Android
mailing list