diff options
author | Allan Wang <me@allanwang.ca> | 2020-07-18 17:08:50 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2020-07-18 17:08:50 -0700 |
commit | 33ad3ab71a06d6505c37b1e23f7d9a82db243c84 (patch) | |
tree | da10027f50ca787b3caa6db74f8786133f44cf19 /fastadapter | |
parent | 3ebee97ef6e1341b7d5538b405c045eaaca971c4 (diff) | |
download | kau-33ad3ab71a06d6505c37b1e23f7d9a82db243c84.tar.gz kau-33ad3ab71a06d6505c37b1e23f7d9a82db243c84.tar.bz2 kau-33ad3ab71a06d6505c37b1e23f7d9a82db243c84.zip |
Update fast adapter
Diffstat (limited to 'fastadapter')
3 files changed, 4 insertions, 4 deletions
diff --git a/fastadapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt b/fastadapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt index 655b355..a9e6bfa 100644 --- a/fastadapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt +++ b/fastadapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt @@ -27,8 +27,8 @@ import com.mikepenz.fastadapter.select.SelectExtension /** * Add kotlin's generic syntax to better support out types */ -fun <Item : GenericItem> fastAdapter(vararg adapter: IAdapter<out Item>) = - FastAdapter.with<Item, IAdapter<out Item>>(adapter.toList()) +fun <Item : GenericItem> fastAdapter(vararg adapter: IAdapter<out Item>): FastAdapter<Item> = + FastAdapter.with(adapter.toList()) /** * Returns selection size, or -1 if selection is disabled diff --git a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt index 1a2e6cb..41663c9 100644 --- a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt +++ b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt @@ -89,7 +89,7 @@ class CardIItem( var imageRes: Int = INVALID_ID } - override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) { + override fun bindView(holder: ViewHolder, payloads: List<Any>) { super.bindView(holder, payloads) with(holder.itemView.context) context@{ with(configs) { diff --git a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt index 551cb59..15ceb31 100644 --- a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt +++ b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt @@ -40,7 +40,7 @@ class HeaderIItem( var text: String = text ?: "Header Placeholder" - override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) { + override fun bindView(holder: ViewHolder, payloads: List<Any>) { super.bindView(holder, payloads) holder.text.text = holder.itemView.context.string(textRes, text) bindTextColor(holder.text) |