do not allow clicking empty portrait placeholders

This commit is contained in:
tibbi 2019-10-04 12:09:28 +02:00
parent dcd7c96380
commit 4848616d88
1 changed files with 2 additions and 1 deletions

View File

@ -72,13 +72,14 @@ class PortraitPhotosAdapter(val context: Context, val photos: ArrayList<String>,
.into(portrait_photo_item_thumbnail) .into(portrait_photo_item_thumbnail)
if (photo.isNotEmpty()) { if (photo.isNotEmpty()) {
isClickable = true
views[position] = this views[position] = this
setOnClickListener { setOnClickListener {
itemClick(position, x.toInt()) itemClick(position, x.toInt())
setCurrentPhoto(position) setCurrentPhoto(position)
} }
} else { } else {
setOnClickListener(null) isClickable = false
} }
} }
return itemView return itemView