diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-12 19:31:55 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-08-30 12:24:19 -0400 |
commit | fba4ac38a8e2dff6e53ba8ecccc95dac2550a3fa (patch) | |
tree | 7747f8f1c396cbe397f0e471ee7204e8106ac30a /kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt | |
parent | 27f38ffe00bc27b76020072a591ce63d20ddd86a (diff) | |
download | kau-fba4ac38a8e2dff6e53ba8ecccc95dac2550a3fa.tar.gz kau-fba4ac38a8e2dff6e53ba8ecccc95dac2550a3fa.tar.bz2 kau-fba4ac38a8e2dff6e53ba8ecccc95dac2550a3fa.zip |
Feature/kpref activity visibility (#38)
* Add visibility toggle
* Update docs
Diffstat (limited to 'kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt')
-rw-r--r-- | kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt index 96f8903..dc74c97 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt @@ -84,6 +84,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor var descRes: Int @StringRes get var iicon: IIcon? + var visible: () -> Boolean /** * Attempts to reload current item by identifying it with its [titleRes] @@ -98,6 +99,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor override @param:StringRes val titleRes: Int) : CoreContract { override var descRes: Int = -1 override var iicon: IIcon? = null + override var visible: () -> Boolean = { true } override fun reloadSelf() { globalOptions.reloadByTitle(titleRes) |