mirror of
https://github.com/Corewala/Buran
synced 2025-01-03 05:34:28 +00:00
Added link listeners to inline images
This commit is contained in:
parent
9ac10f13fd
commit
6fb947cbdd
1 changed files with 12 additions and 1 deletions
|
@ -185,6 +185,18 @@ class GemtextAdapter(
|
||||||
onLink(uri, true, holder.adapterPosition)
|
onLink(uri, true, holder.adapterPosition)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
holder.itemView.gemtext_inline_image.setOnClickListener {
|
||||||
|
val uri = getUri(lines[holder.adapterPosition])
|
||||||
|
println("User clicked image: $uri")
|
||||||
|
onLink(uri, false, holder.adapterPosition)
|
||||||
|
|
||||||
|
}
|
||||||
|
holder.itemView.gemtext_inline_image.setOnLongClickListener {
|
||||||
|
val uri = getUri(lines[holder.adapterPosition])
|
||||||
|
println("User long-clicked image: $uri")
|
||||||
|
onLink(uri, true, holder.adapterPosition)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
when {
|
when {
|
||||||
inlineImages.containsKey(position) -> {
|
inlineImages.containsKey(position) -> {
|
||||||
|
@ -198,7 +210,6 @@ class GemtextAdapter(
|
||||||
println("Inline image rendered: $uri")
|
println("Inline image rendered: $uri")
|
||||||
inlineImage(uri, holder.adapterPosition)
|
inlineImage(uri, holder.adapterPosition)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue