Skip to content

Instantly share code, notes, and snippets.

package ir.android.baham.ui.base.partiotion
import androidx.recyclerview.widget.DiffUtil
sealed class ChangeListEvent {
data class ItemsAdded(val position: Int, val count: Int = 1) : ChangeListEvent()
data class ItemsRemoved(val position: Int, val count: Int = 1) : ChangeListEvent()
data class ItemsUpdated(val position: Int, val count: Int = 1,val payload: Any? = null) : ChangeListEvent()
data class ItemsChange(val diffResult: DiffUtil.DiffResult? = null) : ChangeListEvent()