mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Fix error message interaction on text-only bubbles.
This commit is contained in:
committed by
Cody Henthorne
parent
3439861f74
commit
f2a7824168
@@ -136,10 +136,7 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
||||
)
|
||||
}
|
||||
|
||||
binding.root.setOnClickListener {
|
||||
conversationContext.clickListener.onItemClick(getMultiselectPartForLatestTouch())
|
||||
}
|
||||
|
||||
binding.root.setOnClickListener { onBubbleClicked() }
|
||||
binding.root.setOnLongClickListener {
|
||||
conversationContext.clickListener.onItemLongClick(binding.root, getMultiselectPartForLatestTouch())
|
||||
|
||||
@@ -710,6 +707,28 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
||||
}
|
||||
}
|
||||
|
||||
private fun onBubbleClicked() {
|
||||
val messageRecord = conversationMessage.messageRecord
|
||||
|
||||
when {
|
||||
conversationContext.selectedItems.isNotEmpty() -> {
|
||||
conversationContext.clickListener.onItemClick(getMultiselectPartForLatestTouch())
|
||||
}
|
||||
messageRecord.isFailed -> {
|
||||
conversationContext.clickListener.onMessageWithErrorClicked(messageRecord)
|
||||
}
|
||||
messageRecord.isRateLimited && SignalStore.rateLimit().needsRecaptcha() -> {
|
||||
conversationContext.clickListener.onMessageWithRecaptchaNeededClicked(messageRecord)
|
||||
}
|
||||
messageRecord.isOutgoing && messageRecord.isIdentityMismatchFailure -> {
|
||||
conversationContext.clickListener.onIncomingIdentityMismatchClicked(messageRecord.fromRecipient.id)
|
||||
}
|
||||
else -> {
|
||||
conversationContext.clickListener.onItemClick(getMultiselectPartForLatestTouch())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun disallowSwipe(latestDownX: Float, latestDownY: Float): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user