aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/injectors
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-07-19 14:41:06 -0700
committerAllan Wang <me@allanwang.ca>2020-07-19 14:41:06 -0700
commit983a3dfa7462316df4dc01b583edf0cbe7a9d606 (patch)
tree97738dce61c5c85c52c45c53b587e5355e312b21 /app/src/main/kotlin/com/pitchedapps/frost/injectors
parentdaf8f74ecf4953ffa99b75c2ac35a4b8711f8b10 (diff)
downloadfrost-983a3dfa7462316df4dc01b583edf0cbe7a9d606.tar.gz
frost-983a3dfa7462316df4dc01b583edf0cbe7a9d606.tar.bz2
frost-983a3dfa7462316df4dc01b583edf0cbe7a9d606.zip
Fix imports
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/injectors')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt
index 9aaf5c9d..5329046f 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAssets.kt
@@ -102,8 +102,8 @@ enum class CssAssets(val folder: String = THEME_FOLDER) : InjectorContract {
// Ensures that all non themes and the selected theme are loaded
suspend fun load(context: Context, prefs: Prefs) {
withContext(Dispatchers.IO) {
- val currentTheme = prefs.t.injector as? CssAssets
- val (themes, others) = CssAssets.values().partition { it.folder == THEME_FOLDER }
+ val currentTheme = prefs.themeInjector as? CssAssets
+ val (themes, others) = values().partition { it.folder == THEME_FOLDER }
themes.filter { it != currentTheme }.forEach { it.reset() }
currentTheme?.injector(context, prefs)
others.forEach { it.injector(context, prefs) }