|
|
|
@ -155,7 +155,7 @@ abstract class AbstractBrowserTrayList @JvmOverloads constructor(
|
|
|
|
|
override fun run() {
|
|
|
|
|
val pos = lastDragPos
|
|
|
|
|
val data = lastDragData
|
|
|
|
|
if (pos != null && data != null) {
|
|
|
|
|
if (pos == null || data == null) return
|
|
|
|
|
val (tab, dragOffset) = data
|
|
|
|
|
val sourceId = tab.id
|
|
|
|
|
val sources = findSourceViewAndHolder(sourceId)
|
|
|
|
@ -174,8 +174,8 @@ abstract class AbstractBrowserTrayList @JvmOverloads constructor(
|
|
|
|
|
interactor.onTabsMove(tab.id, targetId, placeAfter)
|
|
|
|
|
// Deal with https://issuetracker.google.com/issues/37018279
|
|
|
|
|
(layoutManager as? ItemTouchHelper.ViewDropHandler)?.prepareForDrop(
|
|
|
|
|
sourceView,targetView,
|
|
|
|
|
dragOffset.x.toInt(),dragOffset.y.toInt())
|
|
|
|
|
sourceView, targetView, dragOffset.x.toInt(), dragOffset.y.toInt()
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -188,7 +188,6 @@ abstract class AbstractBrowserTrayList @JvmOverloads constructor(
|
|
|
|
|
handler.postDelayed(this, DRAG_UPDATE_PERIOD_MS)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
companion object {
|
|
|
|
|
internal const val DRAGGED_TAB_ELEVATION = 10f
|
|
|
|
|
internal const val DRAG_UPDATE_PERIOD_MS = 10L
|
|
|
|
|