For #15115 - Part 5: Don't draw any background when swiping to delete a tab

pull/216/head
Gabriel Luong 4 years ago
parent a001004add
commit 5fa72cf48c

@ -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