diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-22 19:50:44 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-22 19:50:44 -0700 |
commit | da5967f87b8a0e9863fb6b82fc5807bae9e62a00 (patch) | |
tree | 8575d63efacb79ae10a50c471bf3c8055ea1dbf9 /app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt | |
parent | 42d441c0e2b436c7b95fe8dc02ef36608395dbff (diff) | |
download | frost-da5967f87b8a0e9863fb6b82fc5807bae9e62a00.tar.gz frost-da5967f87b8a0e9863fb6b82fc5807bae9e62a00.tar.bz2 frost-da5967f87b8a0e9863fb6b82fc5807bae9e62a00.zip |
Fix up colors and add overlay tip
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt index 9128c42b..a75a4f8d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt @@ -4,6 +4,7 @@ import android.graphics.Color import ca.allanwang.kau.kpref.KPref import ca.allanwang.kau.kpref.StringSet import ca.allanwang.kau.kpref.kpref +import ca.allanwang.kau.utils.isColorVisibleOn import ca.allanwang.kau.utils.lazyResettable import com.pitchedapps.frost.injectors.InjectorContract @@ -56,6 +57,9 @@ object Prefs : KPref() { val iconColor: Int get() = t.iconColor + val accentColor: Int + get() = if (headerColor.isColorVisibleOn(bgColor, 100)) headerColor else textColor + val themeInjector: InjectorContract get() = t.injector @@ -71,4 +75,7 @@ object Prefs : KPref() { var animate: Boolean by kpref("fancy_animations", true) var notificationKeywords: StringSet by kpref("notification_keywords", mutableSetOf<String>()) + + //check if this is the first time launching the web overlay; show snackbar if true + var firstWebOverlay:Boolean by kpref("first_web_overlay", true) } |