|
|
@ -88,16 +88,13 @@ class ItemTouchCallback : ItemTouchHelper.Callback() { |
|
|
|
srcViewHolder: RecyclerView.ViewHolder, |
|
|
|
srcViewHolder: RecyclerView.ViewHolder, |
|
|
|
targetViewHolder: RecyclerView.ViewHolder |
|
|
|
targetViewHolder: RecyclerView.ViewHolder |
|
|
|
): Boolean { |
|
|
|
): Boolean { |
|
|
|
onItemTouchCallbackListener?.let { |
|
|
|
return onItemTouchCallbackListener |
|
|
|
return it.onMove(srcViewHolder.adapterPosition, targetViewHolder.adapterPosition) |
|
|
|
?.onMove(srcViewHolder.adapterPosition, targetViewHolder.adapterPosition) |
|
|
|
} |
|
|
|
?: false |
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { |
|
|
|
override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { |
|
|
|
onItemTouchCallbackListener?.let { |
|
|
|
onItemTouchCallbackListener?.onSwiped(viewHolder.adapterPosition) |
|
|
|
return it.onSwiped(viewHolder.adapterPosition) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onSelectedChanged(viewHolder: RecyclerView.ViewHolder?, actionState: Int) { |
|
|
|
override fun onSelectedChanged(viewHolder: RecyclerView.ViewHolder?, actionState: Int) { |
|
|
|