From 4848616d8867ae733b73ffeb9ec8f39d9cc6fe91 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 4 Oct 2019 12:09:28 +0200 Subject: [PATCH] do not allow clicking empty portrait placeholders --- .../gallery/pro/adapters/PortraitPhotosAdapter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt index 950e4edf7..1752db8ca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/PortraitPhotosAdapter.kt @@ -72,13 +72,14 @@ class PortraitPhotosAdapter(val context: Context, val photos: ArrayList, .into(portrait_photo_item_thumbnail) if (photo.isNotEmpty()) { + isClickable = true views[position] = this setOnClickListener { itemClick(position, x.toInt()) setCurrentPhoto(position) } } else { - setOnClickListener(null) + isClickable = false } } return itemView