diff --git a/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/TableBlockAdapter.kt b/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/TableBlockAdapter.kt index 98291ba1db..2eff64616d 100644 --- a/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/TableBlockAdapter.kt +++ b/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/TableBlockAdapter.kt @@ -41,11 +41,12 @@ class TableBlockAdapter( onCellClicked(getItem(pos)) } } - editorTouchProcessor.onLongClick = { + textContent.setOnLongClickListener { _ -> val pos = bindingAdapterPosition if (pos != RecyclerView.NO_POSITION) { clickListener(ListenerType.LongClick(tableBlockId)) } + true } } } diff --git a/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/holders/TableTextCellHolder.kt b/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/holders/TableTextCellHolder.kt index ce771bdde8..96e3e0c07b 100644 --- a/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/holders/TableTextCellHolder.kt +++ b/core-ui/src/main/java/com/anytypeio/anytype/core_ui/features/table/holders/TableTextCellHolder.kt @@ -13,8 +13,6 @@ import com.anytypeio.anytype.core_ui.databinding.ItemBlockTableRowItemBinding import com.anytypeio.anytype.core_ui.databinding.ItemBlockTableSpaceBinding import com.anytypeio.anytype.core_ui.extensions.resolveThemedTextColor import com.anytypeio.anytype.core_ui.extensions.veryLight -import com.anytypeio.anytype.core_ui.features.editor.EditorTouchProcessor -import com.anytypeio.anytype.core_ui.features.editor.SupportCustomTouchProcessor import com.anytypeio.anytype.core_ui.features.table.TableCellsDiffUtil import com.anytypeio.anytype.core_utils.ext.invisible import com.anytypeio.anytype.core_utils.ext.visible @@ -27,7 +25,7 @@ import com.anytypeio.anytype.presentation.editor.editor.model.BlockView sealed class TableCellHolder(view: View) : RecyclerView.ViewHolder(view) { class TableTextCellHolder(context: Context, binding: ItemBlockTableRowItemBinding) : - TableCellHolder(binding.root), SupportCustomTouchProcessor { + TableCellHolder(binding.root) { val root: View = binding.root val textContent: AppCompatTextView = binding.textContent @@ -45,13 +43,6 @@ sealed class TableCellHolder(view: View) : RecyclerView.ViewHolder(view) { private val mentionInitialsSize = itemView.resources.getDimension(R.dimen.mention_span_initials_size_default) - override val editorTouchProcessor = EditorTouchProcessor( - fallback = { e -> itemView.onTouchEvent(e) }) - - init { - textContent.setOnTouchListener { v, e -> editorTouchProcessor.process(v, e) } - } - fun bind( cell: BlockView.Table.Cell ) {