[Android] Breadcrumb fix

Rahul Gill git at videolan.org
Tue Oct 12 11:00:59 UTC 2021


vlc-android | branch: master | Rahul Gill <rgill1 at protonmail.com> | Tue Oct 12 13:47:49 2021 +0530| [6d5e5d63c381153417c198a5f7ad55d715912fb2] | committer: Rahul Gill

Breadcrumb fix

	1. fixed #2206: breadcrumb navigation fix
	2. when chosing subtitle file, navigating to parent directories
	   makes the breadcrumb invisible

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

 .../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt   | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
index d7e025dc1..204c995d8 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
@@ -166,7 +166,7 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
     open fun registerSwiperRefreshlayout() = swipeRefreshLayout.setOnRefreshListener(this)
 
     override fun setBreadcrumb() {
-        val ariane = requireActivity().findViewById<RecyclerView>(R.id.ariane) ?: return
+        val ariane = binding.ariane
         val media = currentMedia
         if (media != null && isSchemeSupported(media.uri?.scheme)) {
             ariane.visibility = View.VISIBLE
@@ -194,8 +194,7 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
             }
         }
         if (!poped) {
-            viewModel.setDestination(MLServiceLocator.getAbstractMediaWrapper(tag.toUri()))
-            supportFragmentManager.beginTransaction().detach(this).attach(this).commit()
+            browse(MLServiceLocator.getAbstractMediaWrapper(tag.toUri()),false)
         }
     }
 
@@ -214,12 +213,6 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
         (activity as? AudioPlayerContainerActivity)?.expandAppBar()
     }
 
-    override fun onResume() {
-        super.onResume()
-        viewModel.getAndRemoveDestination()?.let {
-            browse(it, true)
-        }
-    }
 
     override fun onStop() {
         super.onStop()



More information about the Android mailing list