diff options
author | Allan Wang <me@allanwang.ca> | 2019-09-22 22:36:16 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-09-22 22:36:16 -0700 |
commit | 981d6ffb409a501e6efcf4fe0cbe719e192beee7 (patch) | |
tree | 8cad6a8e23a493461b06c532a6a67e5f6731b39b /app/src/main/kotlin/com/pitchedapps/frost/fragments | |
parent | 8d355d472f579d10707c8a0b65fb424eb283265d (diff) | |
download | frost-981d6ffb409a501e6efcf4fe0cbe719e192beee7.tar.gz frost-981d6ffb409a501e6efcf4fe0cbe719e192beee7.tar.bz2 frost-981d6ffb409a501e6efcf4fe0cbe719e192beee7.zip |
Apply kau migration
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/fragments')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/fragments/RecyclerFragmentBase.kt | 12 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt | 2 |
2 files changed, 8 insertions, 6 deletions
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<T, Item : IItem<*, *>> : BaseFragment(), RecyclerContentContract { +abstract class RecyclerFragment<T, Item : GenericItem> : BaseFragment(), RecyclerContentContract { override val layoutRes: Int = R.layout.view_content_recycler @@ -72,7 +74,7 @@ abstract class RecyclerFragment<T, Item : IItem<*, *>> : BaseFragment(), Recycle protected abstract suspend fun reloadImpl(progress: (Int) -> Unit): List<T>? } -abstract class GenericRecyclerFragment<T, Item : IItem<*, *>> : RecyclerFragment<T, Item>() { +abstract class GenericRecyclerFragment<T, Item : GenericItem> : RecyclerFragment<T, Item>() { abstract fun mapper(data: T): Item @@ -93,10 +95,10 @@ abstract class GenericRecyclerFragment<T, Item : IItem<*, *>> : RecyclerFragment /** * Create the fast adapter to bind to the recyclerview */ - open fun getAdapter(): FastAdapter<IItem<*, *>> = fastAdapter(this.adapter) + open fun getAdapter(): GenericFastAdapter = fastAdapter(this.adapter) } -abstract class FrostParserFragment<T : ParseData, Item : IItem<*, *>> : +abstract class FrostParserFragment<T : ParseData, Item : GenericItem> : RecyclerFragment<Item, Item>() { /** @@ -125,7 +127,7 @@ abstract class FrostParserFragment<T : ParseData, Item : IItem<*, *>> : /** * Create the fast adapter to bind to the recyclerview */ - open fun getAdapter(): FastAdapter<IItem<*, *>> = fastAdapter(this.adapter) + open fun getAdapter(): GenericFastAdapter = fastAdapter(this.adapter) override suspend fun reloadImpl(progress: (Int) -> Unit): List<Item>? = withContext(Dispatchers.IO) { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt index 7c96235f..0a3884ff 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt @@ -17,7 +17,7 @@ package com.pitchedapps.frost.fragments import android.webkit.WebView -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.contracts.MainFabContract import com.pitchedapps.frost.facebook.FbItem |