diff options
author | Allan Wang <me@allanwang.ca> | 2021-04-17 18:41:11 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-04-17 18:41:11 -0700 |
commit | 7a2026fb3f0342bf42824cb1b7d53f27730e8b01 (patch) | |
tree | 75b1f60a89b3b08baecada090227d036b871b283 /app/src/main/kotlin/com/pitchedapps/frost/iitems | |
parent | 8b233b2629039e8144fe6eef5438125cd48c8973 (diff) | |
download | frost-7a2026fb3f0342bf42824cb1b7d53f27730e8b01.tar.gz frost-7a2026fb3f0342bf42824cb1b7d53f27730e8b01.tar.bz2 frost-7a2026fb3f0342bf42824cb1b7d53f27730e8b01.zip |
Inject tab items
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/iitems')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt index 0fb91aca..f9f9064b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/TabIItem.kt @@ -30,24 +30,23 @@ import com.mikepenz.fastadapter.drag.IDraggable import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.injectors.ThemeProvider -import org.koin.core.component.KoinComponent -import org.koin.core.component.inject /** * Created by Allan Wang on 26/11/17. */ -class TabIItem(val item: FbItem) : +class TabIItem(val item: FbItem, private val themeProvider: ThemeProvider) : KauIItem<TabIItem.ViewHolder>( R.layout.iitem_tab_preview, - { ViewHolder(it) } + { ViewHolder(it, themeProvider) } ), IDraggable { override val isDraggable: Boolean = true - class ViewHolder(itemView: View) : FastAdapter.ViewHolder<TabIItem>(itemView), KoinComponent { - - private val themeProvider: ThemeProvider by inject() + class ViewHolder( + itemView: View, + private val themeProvider: ThemeProvider + ) : FastAdapter.ViewHolder<TabIItem>(itemView) { val image: ImageView by bindView(R.id.image) val text: TextView by bindView(R.id.text) |