Fixed crash in Settings > Appearance > Card page

This commit is contained in:
Tudor Prodan 2017-10-29 15:14:50 +02:00
parent 641f27da54
commit 24ddd90562
1 changed files with 3 additions and 0 deletions

View File

@ -687,6 +687,9 @@ class StatusViewHolder(private val adapter: IStatusesAdapter<*>, itemView: View)
listener.onItemActionClick(holder, R.id.favorite, position)
}
holder.mediaLabel -> {
if (position < 0) {
return
}
val firstMedia = holder.adapter.getStatus(position).media?.firstOrNull()
if (firstMedia != null) {
listener.onMediaClick(holder, v, firstMedia, position)