[Android] Fix thumbnails for video grouped by folder

Nicolas Pomepuy git at videolan.org
Tue Jan 28 10:55:34 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jan 27 08:20:32 2020 +0100| [554b8ced60e828d540a5d737e6c3fcdd9ea9177f] | committer: Geoffrey Métais

Fix thumbnails for video grouped by folder

Fixes #1140

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

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.kt | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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 4c50b3c49..3ab4c52ea 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
@@ -56,7 +56,8 @@ import org.videolan.tools.safeOffer
 import org.videolan.vlc.BR
 import org.videolan.vlc.R
 import org.videolan.vlc.gui.helpers.*
-import org.videolan.vlc.util.*
+import org.videolan.vlc.util.generateResolutionClass
+import org.videolan.vlc.util.scope
 import org.videolan.vlc.viewmodels.mobile.VideoGroupingType
 
 private const val TAG = "VLC/VideoListAdapter"
@@ -111,10 +112,6 @@ class VideoListAdapter(private var isSeenMediaMarkerVisible: Boolean
         holder.selectView(multiSelectHelper.isSelected(position))
     }
 
-    override fun getItemViewType(position: Int) = when (dataType) {
-        VideoGroupingType.FOLDER -> 1
-        else -> 0
-    }
     override fun onBindViewHolder(holder: ViewHolder, position: Int, payloads: List<Any>) {
         if (payloads.isEmpty())
             onBindViewHolder(holder, position)



More information about the Android mailing list