mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
handle long-press of attachment
This commit is contained in:
@@ -285,6 +285,10 @@ class ThreadAdapter(
|
|||||||
imageView.attachment_image.setOnClickListener {
|
imageView.attachment_image.setOnClickListener {
|
||||||
launchViewIntent(uri, mimetype, attachment.filename)
|
launchViewIntent(uri, mimetype, attachment.filename)
|
||||||
}
|
}
|
||||||
|
imageView.setOnLongClickListener {
|
||||||
|
holder.viewLongClicked()
|
||||||
|
true
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (message.isReceivedMessage()) {
|
if (message.isReceivedMessage()) {
|
||||||
val attachmentView = layoutInflater.inflate(R.layout.item_received_unknown_attachment, null).apply {
|
val attachmentView = layoutInflater.inflate(R.layout.item_received_unknown_attachment, null).apply {
|
||||||
@@ -296,6 +300,10 @@ class ThreadAdapter(
|
|||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
launchViewIntent(uri, mimetype, attachment.filename)
|
launchViewIntent(uri, mimetype, attachment.filename)
|
||||||
}
|
}
|
||||||
|
setOnLongClickListener {
|
||||||
|
holder.viewLongClicked()
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
thread_mesage_attachments_holder.addView(attachmentView)
|
thread_mesage_attachments_holder.addView(attachmentView)
|
||||||
@@ -311,6 +319,10 @@ class ThreadAdapter(
|
|||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
launchViewIntent(uri, mimetype, attachment.filename)
|
launchViewIntent(uri, mimetype, attachment.filename)
|
||||||
}
|
}
|
||||||
|
setOnLongClickListener {
|
||||||
|
holder.viewLongClicked()
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
thread_mesage_attachments_holder.addView(attachmentView)
|
thread_mesage_attachments_holder.addView(attachmentView)
|
||||||
|
Reference in New Issue
Block a user