diff options
author | Allan Wang <me@allanwang.ca> | 2019-05-21 19:47:36 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-05-21 19:47:36 -0700 |
commit | 77684bb070dcbd011ffb3b5fb50a88f2cf3e65a2 (patch) | |
tree | bd7ddbaaab3ef4f2ea9ba4601c48345d2f48ae3b /kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt | |
parent | a0b16ab0d8886934f7d29403420ce30e791e7119 (diff) | |
download | kau-77684bb070dcbd011ffb3b5fb50a88f2cf3e65a2.tar.gz kau-77684bb070dcbd011ffb3b5fb50a88f2cf3e65a2.tar.bz2 kau-77684bb070dcbd011ffb3b5fb50a88f2cf3e65a2.zip |
Add configuration options within getter and setter
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 | 10 |
1 files changed, 3 insertions, 7 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 fc632ce..36bf670 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 @@ -30,6 +30,7 @@ import androidx.recyclerview.widget.RecyclerView import ca.allanwang.kau.adapters.ThemableIItem import ca.allanwang.kau.adapters.ThemableIItemDelegate import ca.allanwang.kau.kpref.activity.GlobalOptions +import ca.allanwang.kau.kpref.activity.KPrefItemActions import ca.allanwang.kau.kpref.activity.KPrefMarker import ca.allanwang.kau.kpref.activity.R import ca.allanwang.kau.utils.INVALID_ID @@ -47,7 +48,7 @@ import com.mikepenz.iconics.typeface.IIcon * Core class containing nothing but the view items */ -abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCore, KPrefItemCore.ViewHolder>(), +abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCore, KPrefItemCore.ViewHolder>(), KPrefItemActions by core, ThemableIItem by ThemableIItemDelegate() { final override fun getViewHolder(v: View) = ViewHolder(v) @@ -119,7 +120,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor * Core values for all kpref items */ @KPrefMarker - interface CoreContract { + interface CoreContract : KPrefItemActions { val globalOptions: GlobalOptions val titleId: Int var titleFun: () -> Int @@ -128,11 +129,6 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor var descFun: () -> Int var iicon: IIcon? var visible: () -> Boolean - - /** - * Attempts to reload current item by identifying it with its [id] - */ - fun reloadSelf() } /** |