diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-22 15:01:27 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-22 15:01:27 -0700 |
commit | d924b60bacab29ea7bc385f8f358871999c6c76b (patch) | |
tree | a8d3ff00095e32c7a0d89f411378f6b1fdc92ff5 | |
parent | c2bdcc4c50d03678e2c9200b11dd96395be82652 (diff) | |
download | kau-d924b60bacab29ea7bc385f8f358871999c6c76b.tar.gz kau-d924b60bacab29ea7bc385f8f358871999c6c76b.tar.bz2 kau-d924b60bacab29ea7bc385f8f358871999c6c76b.zip |
Wrap stringset
-rw-r--r-- | library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt | 2 | ||||
-rw-r--r-- | library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt | 2 |
2 files changed, 2 insertions, 2 deletions
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<T : Any> 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) } |