[Android] Show FAB only on tracks tab in the audio browser

Nicolas Pomepuy git at videolan.org
Mon Jun 12 15:59:47 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jun 12 08:49:11 2023 +0200| [12f2b0b2ab846be58da3d4868d6b0bfcbb50f73f] | committer: Nicolas Pomepuy

Show FAB only on tracks tab in the audio browser

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

 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt         | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt
index caaf2a98c4..d3f31d2c5b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt
@@ -316,7 +316,12 @@ class AudioBrowserFragment : BaseAudioBrowser<AudioBrowserViewModel>() {
     }
 
     private fun setFabPlayShuffleAllVisibility(force: Boolean = false) {
-        setFabPlayVisibility(force || viewModel.providers[currentTab].pagedList.value?.size ?: 0 > 2)
+        setFabPlayVisibility(
+                currentTab == 2 && (
+                        force ||
+                                (viewModel.providers[currentTab].pagedList.value?.size ?: 0) > 2
+                        )
+        )
     }
 
     override fun getTitle(): String = getString(R.string.audio)



More information about the Android mailing list