diff options
author | Allan Wang <me@allanwang.ca> | 2021-01-12 21:15:08 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-01-12 21:15:08 -0800 |
commit | e01e51574613459a036c1d60383bfb229799a407 (patch) | |
tree | 4214c9803638fcc1b9d9e19159651f7115c846c4 /app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt | |
parent | 0e5c1ab2dd2b574970883576e18f9a119b058788 (diff) | |
download | frost-e01e51574613459a036c1d60383bfb229799a407.tar.gz frost-e01e51574613459a036c1d60383bfb229799a407.tar.bz2 frost-e01e51574613459a036c1d60383bfb229799a407.zip |
Convert all theme access to themeprovider
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt index 55f41807..e25b603e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt @@ -39,6 +39,7 @@ import com.pitchedapps.frost.contracts.FrostContentCore import com.pitchedapps.frost.contracts.FrostContentParent import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.WEB_LOAD_DELAY +import com.pitchedapps.frost.injectors.ThemeProvider import com.pitchedapps.frost.kotlin.subscribeDuringJob import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.L @@ -80,6 +81,7 @@ abstract class FrostContentView<out T> @JvmOverloads constructor( FrostContentParent, KoinComponent where T : View, T : FrostContentCore { private val prefs: Prefs by inject() + private val themeProvider: ThemeProvider by inject() private val refresh: SwipeRefreshLayout by bindView(R.id.content_refresh) private val progress: ProgressBar by bindView(R.id.content_progress) val coreView: T by bindView(R.id.content_core) @@ -156,9 +158,9 @@ abstract class FrostContentView<out T> @JvmOverloads constructor( } override fun reloadThemeSelf() { - progress.tint(prefs.textColor.withAlpha(180)) - refresh.setColorSchemeColors(prefs.iconColor) - refresh.setProgressBackgroundColorSchemeColor(prefs.headerColor.withAlpha(255)) + progress.tint(themeProvider.textColor.withAlpha(180)) + refresh.setColorSchemeColors(themeProvider.iconColor) + refresh.setProgressBackgroundColorSchemeColor(themeProvider.headerColor.withAlpha(255)) } override fun reloadTextSizeSelf() { |