Skip to content

Releases: vsukharew/AnyTypeAdapter

2.1.1

07 May 15:57
a64ab35
Compare
Choose a tag to compare

Some minor changes as:

  • fixes in sample
  • fixes in unit tests
  • kotlin and android dependenices update

2.1.0

15 Jan 17:19
9c995c4
Compare
Choose a tag to compare
  • Implemented payload definition between two items
  • Upgraded kotlin and kotlin coroutines versions

2.0.0

23 Nov 20:41
404c6a3
Compare
Choose a tag to compare

Breaking changes

  • AnyTypeAdapter does no longer implements the CoroutineScope interface. Now the CoroutineScope is placed inside DiffStrategy
  • DiffStrategy is now a top-level class

Other Changes

  • diff logic moved from the AnyTypeAdapter to appropriate subclasses of the DiffStrategy. Each subclass has default constructor parameters
  • added unit tests for the DiffStrategy

1.2.0

02 Nov 21:31
9b786a8
Compare
Choose a tag to compare
  • 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 from AnyTypeAdapter to AnyTypeCollection

  • optimized complexity of the findCurrentItemViewTypePosition() method. Now the best case is O(1) and the worst one is O(log(n))

1.0.11

06 May 12:22
bcda5c8
Compare
Choose a tag to compare

Added diff strategies

  • AnyTypeAdapter.DiffStrategy.Queue - saves each diff into buffered channel and applies them sequentially
  • AnyTypeAdapter.DiffStrategy.DiscardLatest - discards each diff in favour of the new one

1.0.10

17 Mar 10:32
02c427b
Compare
Choose a tag to compare
  • minSdkVersion = 14
  • updated README.md
  • code is now available as .aar dependency

1.0.5

11 Mar 10:17
f64cec5
Compare
Choose a tag to compare
  • Deleted redundant classes and resources

1.0.4

08 Mar 07:52
e94d3bf
Compare
Choose a tag to compare
  • Changed the build() method logic in AnyTypeCollection
  • Changed the parameters list in the findCurrentItemViewType() function in AnyTypeAdapter
  • Deleted condition when the key returned from the binary search is negative

1.0.3

07 Mar 16:19
6520092
Compare
Choose a tag to compare
  • Fixed generic bound in AdapterItemMetaData
  • Replaced delegateAt(Int) function with a property
  • Replaced linear search in findCurrentItemViewType(AnyTypeCollection, Int) with binary one

1.0.2

02 Mar 15:09
ba276a9
Compare
Choose a tag to compare

Generics bounds fix