mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-01-10 15:33:17 +01:00
Merge pull request #251 from KryptKode/feat/longpress-attachment
handle long-press of attachment
This commit is contained in:
commit
3f83c69324
@ -283,7 +283,15 @@ class ThreadAdapter(
|
||||
|
||||
builder.into(imageView.attachment_image)
|
||||
imageView.attachment_image.setOnClickListener {
|
||||
launchViewIntent(uri, mimetype, attachment.filename)
|
||||
if (actModeCallback.isSelectable) {
|
||||
holder.viewClicked(message)
|
||||
} else {
|
||||
launchViewIntent(uri, mimetype, attachment.filename)
|
||||
}
|
||||
}
|
||||
imageView.setOnLongClickListener {
|
||||
holder.viewLongClicked()
|
||||
true
|
||||
}
|
||||
} else {
|
||||
if (message.isReceivedMessage()) {
|
||||
@ -294,7 +302,15 @@ class ThreadAdapter(
|
||||
}
|
||||
setTextColor(textColor)
|
||||
setOnClickListener {
|
||||
launchViewIntent(uri, mimetype, attachment.filename)
|
||||
if (actModeCallback.isSelectable) {
|
||||
holder.viewClicked(message)
|
||||
} else {
|
||||
launchViewIntent(uri, mimetype, attachment.filename)
|
||||
}
|
||||
}
|
||||
setOnLongClickListener {
|
||||
holder.viewLongClicked()
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -309,7 +325,15 @@ class ThreadAdapter(
|
||||
thread_sent_attachment_label.text = attachment.filename
|
||||
}
|
||||
setOnClickListener {
|
||||
launchViewIntent(uri, mimetype, attachment.filename)
|
||||
if (actModeCallback.isSelectable) {
|
||||
holder.viewClicked(message)
|
||||
} else {
|
||||
launchViewIntent(uri, mimetype, attachment.filename)
|
||||
}
|
||||
}
|
||||
setOnLongClickListener {
|
||||
holder.viewLongClicked()
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user