[Android] Fix VideoBrowserFragment search feature

Nicolas Pomepuy git at videolan.org
Mon Sep 4 09:31:43 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Sep  1 10:27:40 2023 +0200| [ed2d049f8e73fa5b12f1af9ba7ebfcfd5456482d] | committer: Nicolas Pomepuy

Fix VideoBrowserFragment search feature

Fixes #2985

> https://code.videolan.org/videolan/vlc-android/commit/ed2d049f8e73fa5b12f1af9ba7ebfcfd5456482d
---

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoBrowserFragment.kt  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoBrowserFragment.kt
index bf34cc0ae2..26d0bedfcf 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoBrowserFragment.kt
@@ -183,7 +183,7 @@ class VideoBrowserFragment : BaseFragment(), TabLayout.OnTabSelectedListener, Fi
      *
      * @return the current shown fragment
      */
-    private fun getCurrentFragment() = requireActivity().supportFragmentManager.findFragmentByTag("f" + viewPager.currentItem)
+    private fun getCurrentFragment() = childFragmentManager.findFragmentByTag("f" + viewPager.currentItem)
 
     override fun getFilterQuery() = try {
         (getCurrentFragment() as? Filterable)?.getFilterQuery()



More information about the Android mailing list