Created
April 24, 2020 18:09
-
-
Save oscarg798/7f867091d18e4841f137ce5fae774923 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 getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? { | |
val oldItem = oldProducts[oldItemPosition] | |
val newItem = newProducts[newItemPosition] | |
if (oldItem.quantityInCart != newItem.quantityInCart) { | |
return UPDATE_QUANTITY | |
} | |
return null | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment