aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/kotlin/ca
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-22 15:01:27 -0700
committerAllan Wang <me@allanwang.ca>2017-06-22 15:01:27 -0700
commitd924b60bacab29ea7bc385f8f358871999c6c76b (patch)
treea8d3ff00095e32c7a0d89f411378f6b1fdc92ff5 /library/src/main/kotlin/ca
parentc2bdcc4c50d03678e2c9200b11dd96395be82652 (diff)
downloadkau-d924b60bacab29ea7bc385f8f358871999c6c76b.tar.gz
kau-d924b60bacab29ea7bc385f8f358871999c6c76b.tar.bz2
kau-d924b60bacab29ea7bc385f8f358871999c6c76b.zip
Wrap stringset
Diffstat (limited to 'library/src/main/kotlin/ca')
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt2
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt2
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)
}