[Android] Always display the SD/OTG badge on video folders
Nicolas Pomepuy
git at videolan.org
Wed Nov 27 10:40:57 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Nov 27 09:24:30 2024 +0100| [145bbb8a022d9c49833e26c4a5a210c2104ff634] | committer: Duncan McNamara
Always display the SD/OTG badge on video folders
Fixes #3072
> https://code.videolan.org/videolan/vlc-android/commit/145bbb8a022d9c49833e26c4a5a210c2104ff634
---
.../vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
index 8f1561ac85..9e3a482921 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt
@@ -49,6 +49,8 @@ import org.videolan.vlc.BR
import org.videolan.vlc.R
import org.videolan.vlc.gui.helpers.*
import org.videolan.vlc.gui.view.FastScroller
+import org.videolan.vlc.media.isOTG
+import org.videolan.vlc.media.isSD
import org.videolan.vlc.util.*
import org.videolan.vlc.viewmodels.mobile.VideoGroupingType
@@ -135,6 +137,8 @@ class VideoListAdapter(private var isSeenMediaMarkerVisible: Boolean, private va
holder.binding.setVariable(BR.isNetwork, false)
holder.binding.setVariable(BR.isPresent, true)
holder.binding.setVariable(BR.isFavorite, item.isFavorite)
+ holder.binding.setVariable(BR.isSD, item.isSD())
+ holder.binding.setVariable(BR.isOTG, item.isOTG())
holder.binding.setVariable(BR.media, item)
}
is VideoGroup -> holder.itemView.scope.launch {
More information about the Android
mailing list