diff options
author | Allan Wang <me@allanwang.ca> | 2019-06-13 01:14:21 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-06-13 01:14:21 -0700 |
commit | 01058912580a3ecfe77eaf6af209e1c46a97f2d7 (patch) | |
tree | 912e9cf5cd089a444d5cda0a032f933f2aa93918 /about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt | |
parent | 423cad016753a795e9cb75534d172f562e4326c1 (diff) | |
download | kau-01058912580a3ecfe77eaf6af209e1c46a97f2d7.tar.gz kau-01058912580a3ecfe77eaf6af209e1c46a97f2d7.tar.bz2 kau-01058912580a3ecfe77eaf6af209e1c46a97f2d7.zip |
Initial fastadapter update
Diffstat (limited to 'about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt')
-rw-r--r-- | about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt index 755ac81..8ae445d 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt @@ -41,14 +41,14 @@ class FaqIItem(val content: FaqItem) : KauIItem<LibraryIItem, FaqIItem.ViewHolde ), ThemableIItem by ThemableIItemDelegate() { companion object { - fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) { + fun bindEvents(fastAdapter: FastAdapter<IItem<*>>) { fastAdapter.withSelectable(false) - .withEventHook(object : ClickEventHook<IItem<*, *>>() { + .withEventHook(object : ClickEventHook<IItem<*>>() { override fun onBind(viewHolder: RecyclerView.ViewHolder): View? = (viewHolder as? ViewHolder)?.questionContainer - override fun onClick(v: View, position: Int, adapter: FastAdapter<IItem<*, *>>, item: IItem<*, *>) { + override fun onClick(v: View, position: Int, adapter: FastAdapter<IItem<*>>, item: IItem<*>) { if (item !is FaqIItem) return item.isExpanded = !item.isExpanded v.parentViewGroup.findViewById<CollapsibleTextView>(R.id.faq_item_answer) |