[fenix] For https://github.com/mozilla-mobile/fenix/issues/15115 - Part 5: Don't draw any background when swiping to delete a tab

pull/600/head
Gabriel Luong 4 years ago
parent b837358f14
commit 8a4b3d85d4

@ -17,6 +17,7 @@ import mozilla.components.support.ktx.android.content.getColorFromAttr
import mozilla.components.support.ktx.android.content.getDrawableWithTint
import mozilla.components.support.ktx.android.util.dpToPx
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.home.sessioncontrol.SwipeToDeleteCallback
/**
@ -68,6 +69,10 @@ class TouchCallback(
) {
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
if (recyclerView.context.settings().gridTabView) {
return
}
val icon = recyclerView.context.getDrawableWithTint(
R.drawable.ic_delete,
recyclerView.context.getColorFromAttr(R.attr.destructive)

Loading…
Cancel
Save