From d924b60bacab29ea7bc385f8f358871999c6c76b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 22 Jun 2017 15:01:27 -0700 Subject: Wrap stringset --- library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt | 2 +- library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'library/src/main/kotlin') diff --git a/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt b/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt index 564898a..4904194 100644 --- a/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt +++ b/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt @@ -41,7 +41,7 @@ interface CoreAttributeContract { */ class CoreAttributeBuilder : CoreAttributeContract { override var textColor: (() -> Int)? = null - override var accentColor: (() -> Int)? = null + override var accentColor: (() -> Int)? = textColor } interface KPrefActivityContract { diff --git a/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt b/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt index fb42e65..4d57ff1 100644 --- a/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt +++ b/library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt @@ -53,7 +53,7 @@ class KPrefDelegate internal constructor(private val key: String, priva is Float -> pref.sp.getFloat(key, fallback) is Int -> pref.sp.getInt(key, fallback) is Long -> pref.sp.getLong(key, fallback) - is StringSet -> pref.sp.getStringSet(key, fallback) + is StringSet -> StringSet(pref.sp.getStringSet(key, fallback)) is String -> pref.sp.getString(key, fallback) else -> throw KPrefException(fallback) } -- cgit v1.2.3