Skip to content

Supporting DiffOperation.Update for items with the same identifier #8

@FritiofSchander

Description

@FritiofSchander

Hey!

I have a feature request.

I would like to be able to use a library like Difference like i would use DiffUtils where the differences are based on not only the index in the list, but also the identity of the item. This way i could receive DiffOperations which are not only Add/Remove/Move, but also Update. Not sure if it would be possible to implement with your current algorithm.

Something like
fun <K, V> generateDiffs( original: List<V>, updated: List<V>, detectMoves: Boolean, keySelector: (V) -> K )
or:
fun <K, V> generateDiffs( original: Map<K, V>, updated: Map<K, V>, )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions