overridable getCollectionPosition() (#24)

This commit is contained in:
Anton Domnikov 2019-06-18 20:40:42 +02:00 committed by GitHub
parent 1e0bed9fd2
commit 30ff9a9037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -84,6 +84,6 @@ open class DelegationListAdapter<TItem>(config: AsyncDifferConfig<TItem>) : Recy
*/
fun getList(): List<TItem> = differ.currentList
fun getCollectionPosition(adapterPosition: Int) = adapterPosition - getHeadersCount()
open fun getCollectionPosition(adapterPosition: Int) = adapterPosition - getHeadersCount()
}