aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt
index 4561fa6e..6e735e5b 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt
@@ -23,7 +23,6 @@ import com.pitchedapps.frost.R
import com.pitchedapps.frost.activities.IntroActivity
import com.pitchedapps.frost.databinding.IntroThemeBinding
import com.pitchedapps.frost.enums.Theme
-import com.pitchedapps.frost.utils.Prefs
/**
* Created by Allan Wang on 2017-07-28.
@@ -56,7 +55,7 @@ class IntroFragmentTheme : BaseIntroFragment(R.layout.intro_theme) {
introThemeDark.setThemeClick(Theme.DARK)
introThemeAmoled.setThemeClick(Theme.AMOLED)
introThemeGlass.setThemeClick(Theme.GLASS)
- val currentTheme = Prefs.theme - 1
+ val currentTheme = prefs.theme - 1
if (currentTheme in 0..3)
themeList.forEachIndexed { index, v ->
v.scaleXY = if (index == currentTheme) 1.6f else 0.8f
@@ -65,9 +64,9 @@ class IntroFragmentTheme : BaseIntroFragment(R.layout.intro_theme) {
private fun View.setThemeClick(theme: Theme) {
setOnClickListener { v ->
- Prefs.theme = theme.ordinal
+ prefs.theme = theme.ordinal
(activity as IntroActivity).apply {
- binding.ripple.ripple(Prefs.bgColor, v.x + v.pivotX, v.y + v.pivotY)
+ binding.ripple.ripple(prefs.bgColor, v.x + v.pivotX, v.y + v.pivotY)
theme()
}
themeList.forEach { it.animate().scaleXY(if (it == this) 1.6f else 0.8f).start() }