1
0
Fork 0
mirror of https://github.com/Corewala/Buran synced 2024-12-22 07:42:43 +00:00

Hide previously rendered images when inline images is disabled

This commit is contained in:
Corewala 2022-01-10 14:27:51 -05:00
parent 6fb947cbdd
commit f7deb674c5

View file

@ -204,7 +204,6 @@ class GemtextAdapter(
holder.itemView.gemtext_inline_image.setImageURI(inlineImages[position])
}
else -> {
holder.itemView.gemtext_inline_image.visible(false)
if (showInlineImages){
val uri = getUri(lines[holder.adapterPosition])
println("Inline image rendered: $uri")
@ -217,6 +216,11 @@ class GemtextAdapter(
showInlineIcons -> holder.itemView.gemtext_text_link.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.vector_photo, 0)
else -> holder.itemView.gemtext_text_link.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0)
}
when {
showInlineImages -> holder.itemView.gemtext_inline_image.visible(true)
else -> holder.itemView.gemtext_inline_image.visible(false)
}
}
}
}