From da5967f87b8a0e9863fb6b82fc5807bae9e62a00 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 22 Jun 2017 19:50:44 -0700 Subject: Fix up colors and add overlay tip --- app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt') 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()) + + //check if this is the first time launching the web overlay; show snackbar if true + var firstWebOverlay:Boolean by kpref("first_web_overlay", true) } -- cgit v1.2.3