aboutsummaryrefslogtreecommitdiff
path: root/adapter/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-10 22:17:28 -0500
committerGitHub <noreply@github.com>2017-12-10 22:17:28 -0500
commit1269a026da6a4597f7123e310768e3377e8c63e8 (patch)
tree2a04154b8a05154ef3b1a427cf4c328c6a30ce8b /adapter/src/main/kotlin
parent63f7797e42972f5a56f9f50960074b02e1b6dd51 (diff)
downloadkau-1269a026da6a4597f7123e310768e3377e8c63e8.tar.gz
kau-1269a026da6a4597f7123e310768e3377e8c63e8.tar.bz2
kau-1269a026da6a4597f7123e310768e3377e8c63e8.zip
fix/lint (#110)
* Remove nullability to match fastadapter * Remove redundant override
Diffstat (limited to 'adapter/src/main/kotlin')
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt4
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt2
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt1
3 files changed, 4 insertions, 3 deletions
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
index 9865c70..6ce81a3 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
@@ -27,7 +27,7 @@ import com.mikepenz.iconics.typeface.IIcon
class CardIItem(
val builder: Config.() -> Unit = {}
) : KauIItem<CardIItem, CardIItem.ViewHolder>(
- R.layout.kau_iitem_card, { ViewHolder(it) }, R.id.kau_item_card
+ R.layout.kau_iitem_card, ::ViewHolder, R.id.kau_item_card
), ThemableIItem by ThemableIItemDelegate() {
companion object {
@@ -69,7 +69,7 @@ class CardIItem(
var imageRes: Int = -1
}
- override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
+ override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
super.bindView(holder, payloads)
with(holder.itemView.context) context@ {
with(configs) {
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
index d6d06f3..8367e7c 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
@@ -24,7 +24,7 @@ class HeaderIItem(
var text: String = text ?: "Header Placeholder"
- override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
+ override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
super.bindView(holder, payloads)
holder.text.text = holder.itemView.context.string(textRes, text)
bindTextColor(holder.text)
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
index d8567c4..335b89c 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
@@ -21,4 +21,5 @@ open class KauIItem<Item, VH : RecyclerView.ViewHolder>(
override final fun getType(): Int = type
override final fun getViewHolder(v: View): VH = viewHolder(v)
override final fun getLayoutRes(): Int = layoutRes
+
} \ No newline at end of file