mirror of
https://github.com/Corewala/Buran
synced 2024-12-22 15:55:35 +00:00
Streamlined inline images rendering
This commit is contained in:
parent
441aff3c98
commit
88d8075a45
1 changed files with 4 additions and 6 deletions
|
@ -196,20 +196,18 @@ class GemtextAdapter(
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
if("://" !in getLink(lines[holder.adapterPosition])){
|
if(("://" !in getLink(lines[holder.adapterPosition])) and showInlineImages){
|
||||||
when {
|
when {
|
||||||
inlineImages.containsKey(position) -> {
|
inlineImages.containsKey(position) -> {
|
||||||
holder.itemView.rounded_image_frame.visible(true)
|
holder.itemView.rounded_image_frame.visible(true)
|
||||||
holder.itemView.gemtext_inline_image.setImageURI(inlineImages[position])
|
holder.itemView.gemtext_inline_image.setImageURI(inlineImages[position])
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
if (showInlineImages){
|
|
||||||
val uri = getUri(lines[holder.adapterPosition])
|
val uri = getUri(lines[holder.adapterPosition])
|
||||||
println("Inline image rendered: $uri")
|
println("Inline image rendered: $uri")
|
||||||
inlineImage(uri, holder.adapterPosition)
|
inlineImage(uri, holder.adapterPosition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
holder.itemView.rounded_image_frame.visible(false)
|
holder.itemView.rounded_image_frame.visible(false)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue