Releases: vsukharew/AnyTypeAdapter
Releases · vsukharew/AnyTypeAdapter
2.1.1
2.1.0
2.0.0
Breaking changes
AnyTypeAdapter
does no longer implements theCoroutineScope
interface. Now theCoroutineScope
is placed insideDiffStrategy
DiffStrategy
is now a top-level class
Other Changes
- diff logic moved from the
AnyTypeAdapter
to appropriate subclasses of theDiffStrategy
. Each subclass has default constructor parameters - added unit tests for the
DiffStrategy
1.2.0
-
edited publishing script so now you can add the library as a dependency without the
@aar
suffix -
changed AnyTypeCollection.Builder methods (non-breaking changes):
addIf
previous version:
fun <T : Any, V : ViewBinding, H : AnyTypeViewHolder<List<T>, V>> addIf( items: List<T>, delegate: AnyTypeDelegate<List<T>, V, H>, predicate: () -> Boolean )
current version:
fun <T : Any, V : ViewBinding, H : AnyTypeViewHolder<T, V>> addIf( items: List<T>, delegate: AnyTypeDelegate<T, V, H>, predicate: () -> Boolean )
addIfNotEmpty
previous version:
fun <T : Any, V : ViewBinding, H : AnyTypeViewHolder<List<T>, V>> addIfNotEmpty( items: List<T>, delegate: AnyTypeDelegate<List<T>, V, H> )
current version:
fun <T : Any, V : ViewBinding, H : AnyTypeViewHolder<T, V>> addIfNotEmpty( items: List<T>, delegate: AnyTypeDelegate<T, V, H> )
and
fun <T : Iterable<*>, V : ViewBinding, H : AnyTypeViewHolder<T, V>> addIfNotEmpty( item: T, delegate: AnyTypeDelegate<T, V, H> )
-
fixed returning the same id for each
NoDataDelegate
-
Added unit tests for
AnyTypeCollection
,AnyTypeCollection.Builder
,AnyTypeDelegate
-
moved the
findCurrentItemViewTypePosition()
method fromAnyTypeAdapter
toAnyTypeCollection
-
optimized complexity of the
findCurrentItemViewTypePosition()
method. Now the best case is O(1) and the worst one is O(log(n))