mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-06 20:15:40 +00:00
disable interaction for deleted messages
This commit is contained in:
parent
9ab285c3be
commit
9dcc5dd848
@ -73,9 +73,11 @@ class ConversationAdapter(context: Context, cursor: Cursor, private val onItemPr
|
|||||||
val position = viewHolder.adapterPosition
|
val position = viewHolder.adapterPosition
|
||||||
view.indexInAdapter = position
|
view.indexInAdapter = position
|
||||||
view.bind(message, getMessageBefore(position, cursor), getMessageAfter(position, cursor), glide, searchQuery)
|
view.bind(message, getMessageBefore(position, cursor), getMessageAfter(position, cursor), glide, searchQuery)
|
||||||
|
if (!message.isDeleted) {
|
||||||
view.onPress = { event -> onItemPress(message, viewHolder.adapterPosition, view, event) }
|
view.onPress = { event -> onItemPress(message, viewHolder.adapterPosition, view, event) }
|
||||||
view.onSwipeToReply = { onItemSwipeToReply(message, viewHolder.adapterPosition) }
|
view.onSwipeToReply = { onItemSwipeToReply(message, viewHolder.adapterPosition) }
|
||||||
view.onLongPress = { onItemLongPress(message, viewHolder.adapterPosition) }
|
view.onLongPress = { onItemLongPress(message, viewHolder.adapterPosition) }
|
||||||
|
}
|
||||||
view.contentViewDelegate = visibleMessageContentViewDelegate
|
view.contentViewDelegate = visibleMessageContentViewDelegate
|
||||||
}
|
}
|
||||||
is ControlMessageViewHolder -> viewHolder.view.bind(message)
|
is ControlMessageViewHolder -> viewHolder.view.bind(message)
|
||||||
|
@ -266,6 +266,7 @@ class VisibleMessageView : LinearLayout {
|
|||||||
|
|
||||||
// region Interaction
|
// region Interaction
|
||||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||||
|
if (onPress == null || onSwipeToReply == null || onLongPress == null) { return false }
|
||||||
when (event.action) {
|
when (event.action) {
|
||||||
MotionEvent.ACTION_DOWN -> onDown(event)
|
MotionEvent.ACTION_DOWN -> onDown(event)
|
||||||
MotionEvent.ACTION_MOVE -> onMove(event)
|
MotionEvent.ACTION_MOVE -> onMove(event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user