diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-09 11:28:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-09 11:28:59 -0700 |
commit | e6ec9c5dd677be298430cb2b694f047c67b03239 (patch) | |
tree | f0bc2a630c9335b608ac9076ca868f5a5658c75c /core/src/main/kotlin | |
parent | 0af8b379fc0968c830c8938e1998b5bd3dd7e0aa (diff) | |
download | kau-e6ec9c5dd677be298430cb2b694f047c67b03239.tar.gz kau-e6ec9c5dd677be298430cb2b694f047c67b03239.tar.bz2 kau-e6ec9c5dd677be298430cb2b694f047c67b03239.zip |
KAU 2.0 (#1) - Update docs and finish up refractoring
* Update readme
* Add docs for remaining submodules
* Update searchview
* Update links 1/3
* Update links 2/3
* Update links 3/3
* update changelog
* Update readme
* Test rename to readme
* Rename remaining to readme
* Link readme to repo
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt index 58e570f..6c0b608 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt @@ -40,8 +40,11 @@ class KPrefSingleDelegate internal constructor(private val key: String, private _v2 } else { _value = pref.sp.getBoolean(key, true) - if (_value!!) pref.sp.edit().putBoolean(key, false).apply() - _value!! + if (_value!!) { + pref.sp.edit().putBoolean(key, false).apply() + _value = false + true + } else false } } } |