diff options
author | Allan Wang <me@allanwang.ca> | 2021-01-24 22:04:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 22:04:37 -0800 |
commit | 94aa2dd8125f474570f366408645e5a81236c573 (patch) | |
tree | 2952e3ca17872ef10545081a100f16b720f0072a /app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt | |
parent | 68db99597b68c87f1e0eb2d1feb6b6c63bbff1e9 (diff) | |
parent | 35adc9529f1466e3ae45ee1934536f696bc24547 (diff) | |
download | frost-94aa2dd8125f474570f366408645e5a81236c573.tar.gz frost-94aa2dd8125f474570f366408645e5a81236c573.tar.bz2 frost-94aa2dd8125f474570f366408645e5a81236c573.zip |
Merge pull request #1742 from AllanWang/messenger
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt index 47a362b4..0c53a2b1 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/iitems/GenericIItems.kt @@ -28,6 +28,7 @@ import com.mikepenz.fastadapter.IAdapter import com.mikepenz.fastadapter.select.selectExtension import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbCookie +import com.pitchedapps.frost.injectors.ThemeProvider import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.launchWebOverlay import org.koin.core.component.KoinComponent @@ -79,14 +80,14 @@ open class HeaderIItem( class ViewHolder(itemView: View) : FastAdapter.ViewHolder<HeaderIItem>(itemView), KoinComponent { - private val prefs: Prefs by inject() + private val themeProvider: ThemeProvider by inject() val text: TextView by bindView(R.id.item_header_text) override fun bindView(item: HeaderIItem, payloads: List<Any>) { - text.setTextColor(prefs.accentColor) + text.setTextColor(themeProvider.accentColor) text.text = item.text - text.setBackgroundColor(prefs.nativeBgColor) + text.setBackgroundColor(themeProvider.nativeBgColor) } override fun unbindView(item: HeaderIItem) { @@ -108,14 +109,14 @@ open class TextIItem( class ViewHolder(itemView: View) : FastAdapter.ViewHolder<TextIItem>(itemView), KoinComponent { - private val prefs: Prefs by inject() + private val themeProvider: ThemeProvider by inject() val text: TextView by bindView(R.id.item_text_view) override fun bindView(item: TextIItem, payloads: List<Any>) { - text.setTextColor(prefs.textColor) + text.setTextColor(themeProvider.textColor) text.text = item.text - text.background = createSimpleRippleDrawable(prefs.bgColor, prefs.nativeBgColor) + text.background = createSimpleRippleDrawable(themeProvider.bgColor, themeProvider.nativeBgColor) } override fun unbindView(item: TextIItem) { |