From 981d6ffb409a501e6efcf4fe0cbe719e192beee7 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 22 Sep 2019 22:36:16 -0700 Subject: Apply kau migration --- .../com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt index 71c27dd2..d73f3eb9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt @@ -19,6 +19,8 @@ package com.pitchedapps.frost.fragments import ca.allanwang.kau.adapters.fastAdapter import ca.allanwang.kau.utils.withMainContext import com.mikepenz.fastadapter.FastAdapter +import com.mikepenz.fastadapter.GenericFastAdapter +import com.mikepenz.fastadapter.GenericItem import com.mikepenz.fastadapter.IItem import com.mikepenz.fastadapter.adapters.ItemAdapter import com.mikepenz.fastadapter.adapters.ModelAdapter @@ -36,7 +38,7 @@ import kotlinx.coroutines.withContext /** * Created by Allan Wang on 27/12/17. */ -abstract class RecyclerFragment> : BaseFragment(), RecyclerContentContract { +abstract class RecyclerFragment : BaseFragment(), RecyclerContentContract { override val layoutRes: Int = R.layout.view_content_recycler @@ -72,7 +74,7 @@ abstract class RecyclerFragment> : BaseFragment(), Recycle protected abstract suspend fun reloadImpl(progress: (Int) -> Unit): List? } -abstract class GenericRecyclerFragment> : RecyclerFragment() { +abstract class GenericRecyclerFragment : RecyclerFragment() { abstract fun mapper(data: T): Item @@ -93,10 +95,10 @@ abstract class GenericRecyclerFragment> : RecyclerFragment /** * Create the fast adapter to bind to the recyclerview */ - open fun getAdapter(): FastAdapter> = fastAdapter(this.adapter) + open fun getAdapter(): GenericFastAdapter = fastAdapter(this.adapter) } -abstract class FrostParserFragment> : +abstract class FrostParserFragment : RecyclerFragment() { /** @@ -125,7 +127,7 @@ abstract class FrostParserFragment> : /** * Create the fast adapter to bind to the recyclerview */ - open fun getAdapter(): FastAdapter> = fastAdapter(this.adapter) + open fun getAdapter(): GenericFastAdapter = fastAdapter(this.adapter) override suspend fun reloadImpl(progress: (Int) -> Unit): List? = withContext(Dispatchers.IO) { -- cgit v1.2.3