mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-05 23:14:03 -05:00
Added sorting order to modules
This commit is contained in:
@@ -90,11 +90,24 @@ object InstallModule : ComparableRvItem<InstallModule>() {
|
||||
|
||||
class SectionTitle(
|
||||
val title: Int,
|
||||
val button: Int = 0,
|
||||
val icon: Int = 0
|
||||
) : ComparableRvItem<SectionTitle>() {
|
||||
_button: Int = 0,
|
||||
_icon: Int = 0
|
||||
) : ObservableItem<SectionTitle>() {
|
||||
override val layoutRes = R.layout.item_section_md2
|
||||
|
||||
@Bindable
|
||||
var button = _button
|
||||
set(value) {
|
||||
field = value
|
||||
notifyChange(BR.button)
|
||||
}
|
||||
@Bindable
|
||||
var icon = _icon
|
||||
set(value) {
|
||||
field = value
|
||||
notifyChange(BR.icon)
|
||||
}
|
||||
|
||||
val hasButton = KObservableField(button != 0 || icon != 0)
|
||||
|
||||
override fun onBindingBound(binding: ViewDataBinding) {
|
||||
|
||||
Reference in New Issue
Block a user