epoxy-adapter / com.airbnb.epoxy / EpoxyController / setFilterDuplicates

setFilterDuplicates

open fun setFilterDuplicates(filterDuplicates: Boolean): Unit

If set to true, Epoxy will search for models with duplicate ids added during and remove any duplicates found. If models with the same id are found, the first one is left in the adapter and any subsequent models are removed. will be called for each duplicate removed.

This may be useful if your models are created via server supplied data, in which case the server may erroneously send duplicate items. Duplicate items are otherwise left in and can result in undefined behavior.