Created
April 24, 2020 18:10
-
-
Save oscarg798/b2c85f73cb139b521e72d4041f236709 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onBindViewHolder( | |
holder: ProductViewHolder, | |
position: Int, | |
payloads: MutableList | |
) { | |
if (payloads.isEmpty()) { | |
onBindViewHolder(holder, position) | |
} else { | |
for (data in payloads) { | |
when (data as Int) { | |
INVALID_PRODUCT_POSITION -> holder.updateProductQuantity(products[position].quantityInCart) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment