[Android] Remove image click on history cards

Nicolas Pomepuy git at videolan.org
Thu Apr 16 15:43:27 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Apr  3 09:39:30 2020 +0200| [08498268aa9239db4aa507ff728ed789e7db5aa3] | committer: Nicolas Pomepuy

Remove image click on history cards

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

 application/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.kt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.kt
index 147988b64..983b4b54b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.kt
@@ -75,7 +75,10 @@ class HistoryAdapter(private val inCards: Boolean = false) : DiffUtilAdapter<Med
         fun onLongClick(v: View) = eventsChannel.safeOffer(LongClick(layoutPosition))
 
         fun onImageClick(v: View) {
-            eventsChannel.safeOffer(ImageClick(layoutPosition))
+            if (inCards)
+                eventsChannel.safeOffer(SimpleClick(layoutPosition))
+            else
+                eventsChannel.safeOffer(ImageClick(layoutPosition))
         }
 
         override fun isSelected() = getItem(layoutPosition).hasStateFlags(MediaLibraryItem.FLAG_SELECTED)



More information about the Android mailing list