[Android] Fix NetworkBrowserFragment leaking the toolbar

Nicolas Pomepuy git at videolan.org
Thu Apr 25 09:46:17 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Apr 23 14:04:45 2024 +0200| [edc259c121e21271df591873977d85cf2ad3a172] | committer: Duncan McNamara

Fix NetworkBrowserFragment leaking the toolbar

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

 .../src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
index d0cb551cb3..d174ddc78f 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
@@ -105,6 +105,11 @@ class NetworkBrowserFragment : BaseBrowserFragment(), IDialogManager {
         fabPlay?.setOnClickListener { onFabPlayClick(it) }
     }
 
+    override fun onDestroyView() {
+        (requireActivity() as? SecondaryActivity)?.setSupportActionBar(null)
+        super.onDestroyView()
+    }
+
     override fun refresh() {
         if (networkMonitor.connected)
             super.refresh()



More information about the Android mailing list